Пример #1
0
 /**
  * Store a newly created Partner in storage.
  *
  * @param CreatePartnerRequest $request
  *
  * @return Response
  */
 public function store(CreatePartnerRequest $request)
 {
     $input = $request->all();
     $partner = $this->partnerRepository->create($input);
     Flash::success('Partner saved successfully.');
     return redirect(route('partners.index'));
 }
Пример #2
0
 /**
  * Store a newly created Partner in storage.
  * POST /partners
  *
  * @param Request $request
  *
  * @return Response
  */
 public function store(Request $request)
 {
     if (sizeof(Partner::$rules) > 0) {
         $this->validateRequestOrFail($request, Partner::$rules);
     }
     $input = $request->all();
     $partners = $this->partnerRepository->create($input);
     return $this->sendResponse($partners->toArray(), "Partner saved successfully");
 }