app/Http/Controllers/DistrictsController.php
/**
     * Update the specified Districts in storage.
     *
     * @param int $id
     * @param UpdateDistrictsRequest $request
     *
     * @return Response
     */
Update the specified Districts in storage.
@param int $id
@param UpdateDistrictsRequest $request

@return Response
Update the specified Districts in storage . @param int $id @param UpdateDistrictsRequest $request @return Response
public function update($id, UpdateDistrictsRequest $request)
    {
        $districts = $this->districtsRepository->find($id);
        if (empty($districts)) {
            Flash::error('Districts not found');
            return redirect(route('districts.index'));
        }
        $districts = $this->districtsRepository->update($request->all(), $id);
        Flash::success('Districts updated successfully.');
        return redirect(route('districts.index'));
    }
public function update ( $ id , UpdateDistrictsRequest $ request ) { $ districts = $ this -> districtsRepository -> find ( $ id ) ; if ( empty ( $ districts ) ) { Flash :: error ( 'Districts not found' ) ; return redirect ( route ( 'districts.index' ) ) ; } $ districts = $ this -> districtsRepository -> update ( $ request -> all ( ) , $ id ) ; Flash :: success ( 'Districts updated successfully.' ) ; return redirect ( route ( 'districts.index' ) ) ; }
Update the specified Districts in storage.
Update the specified Districts in storage .