/**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(Request $request, $id)
 {
     $data = $request->all();
     $data['project_id'] = $id;
     return $this->service->create($data);
     //return $this->repository->create($request->all());
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     //return $this->service->create($request->all());
     try {
         return $this->service->create($request->all());
     } catch (QueryException $e) {
         return ['error' => true, 'message' => 'Não foi possível criar a nota. Projeto não existe!'];
     }
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request, $id)
 {
     // $projectId = ($request->exists('project_id')) ? $request->get('project_id') : 0;
     $data = $request->all();
     $data['project_id'] = $id;
     if ($this->projectService->checkProjectPermissions($data['project_id']) == false) {
         return ['error' => 'Access forbidden'];
     }
     return $this->service->create($data);
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     return $this->service->create($request->all());
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function store(Request $request, $id)
 {
     $inputs = $request->all();
     $inputs['project_id'] = $id;
     return $this->service->create($inputs);
 }
 /**
  * @param Request $request
  * @param $projectId
  * @return array|mixed
  */
 public function store(Request $request, $projectId)
 {
     return $this->service->create($request->all(), $projectId);
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request $request
  * @return Response
  */
 public function store(Request $request, $projectId)
 {
     $data = $request->all();
     $data['project_id'] = $projectId;
     return $this->service->create($data);
 }
Пример #8
0
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create(Request $request)
 {
     //dd($request->all());
     return $this->service->create($request->all());
 }
 /**
  * Store a newly created resource in storage.
  *
  * @param $projectId
  * @param  Request $request
  * @return Response
  */
 public function store($projectId, Request $request)
 {
     return $this->service->create($request->all() + ['project_id' => $projectId]);
 }
Пример #10
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request $request
  * @return Response
  */
 public function store($project_id, Request $request)
 {
     return $this->service->create($project_id, $request->all());
 }