Beispiel #1
0
 public function postProduct(Requests\productAddRequest $request)
 {
     $data = $request->except('_token');
     $saver = new productSaver($data);
     $saver->save();
     if ($saver->getStatus()) {
         $message = 'Работа успешно добавлена';
     } else {
         $message = $saver->getError();
     }
     return back()->with('message', $message);
 }
Beispiel #2
0
 public function __construct($id, array $data)
 {
     $this->id = $id;
     parent::__construct($data);
 }