public function update($id, PromotionRequest $request)
    {
        $promotion = $this->repository->find($id);

        if (empty($promotion)) {
            Cms::notification('Promotions not found', 'warning');

            return redirect(route($this->routeBase.'.promotions.index'));
        }

        $promotion = $this->repository->update($promotion, $request->all());

        Cms::notification('Promotions updated successfully.', 'success');

        return redirect(url()->previous());
    }
public function update($id, PromotionRequest $request)
    {
        $promotion = $this->repository->find($id);

        if (empty($promotion)) {
            Cms::notification('Promotions not found', 'warning');

            return redirect(route($this->routeBase.'.promotions.index'));
        }

        $promotion = $this->repository->update($promotion, $request->all());

        Cms::notification('Promotions updated successfully.', 'success');

        return redirect(url()->previous());
    }
public function update ( $ id , PromotionRequest $ request ) { $ promotion = $ this -> repository -> find ( $ id ) ; if ( empty ( $ promotion ) ) { Cms :: notification ( 'Promotions not found' , 'warning' ) ; return redirect ( route ( $ this -> routeBase . '.promotions.index' ) ) ; } $ promotion = $ this -> repository -> update ( $ promotion , $ request -> all ( ) ) ; Cms :: notification ( 'Promotions updated successfully.' , 'success' ) ; return redirect ( url ( ) -> previous ( ) ) ; }
Update the specified Promotions in storage.

@param int            $id
@param PromotionRequest $request

@return Response
Update the specified Promotions in storage .