示例#1
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request $request
  * @return Response
  */
 public function store(Request $request)
 {
     //
     $this->validate($request, ['title' => 'required|max:255', 'description' => 'required|min:50', 'category_id' => 'required', 'state' => 'required', 'contact_email' => 'required|email']);
     $data = array_add($request->all(), 'user_id', 1);
     Jobs::create($data);
     return redirect()->route('jobs.index');
 }
示例#2
0
 public function postAdd(AddJobRequest $request)
 {
     //
     Jobs::create($request->all());
     return redirect('jobs/add')->with('success', 'Вакансия успешно добалена!');
 }