app/Http/Controllers/JobCategoryController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $this->validate($request, [
            'name' => 'required|max:200',
            'job_type_id' => 'required',
        ]);
        $jobCate = new JobCategory();
        $jobCate = JobCategory::setData($jobCate, $request);
        $jobCate->save();
        return redirect()->route('job_cate.index', 'jobtype='.$request->job_type_id);
    }
public function store ( Request $ request ) { $ this -> validate ( $ request , [ 'name' => 'required|max:200' , 'job_type_id' => 'required' , ] ) ; $ jobCate = new JobCategory ( ) ; $ jobCate = JobCategory :: setData ( $ jobCate , $ request ) ; $ jobCate -> save ( ) ; return redirect ( ) -> route ( 'job_cate.index' , 'jobtype=' . $ request -> job_type_id ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .