app/Http/Controllers/JobCategoryController.php
/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
Show the form for creating a new resource.
@return \Illuminate\Http\Response
Show the form for creating a new resource . @return \ Illuminate \ Http \ Response
public function create(Request $request)
    {
        $jobCateId = $request->jobtype;
        if($jobCateId != null && !empty($jobCateId)) {
            return view('layouts.admin.job_and_relate.job_category.create')->with('jobtype', JobType::find($jobCateId));
        } else {
            $jobCates = JobType::all();
            return view('layouts.admin.job_and_relate.job_category.create')->with('jobtypes', $jobCates);
        }
    }
public function create ( Request $ request ) { $ jobCateId = $ request -> jobtype ; if ( $ jobCateId != null && ! empty ( $ jobCateId ) ) { return view ( 'layouts.admin.job_and_relate.job_category.create' ) -> with ( 'jobtype' , JobType :: find ( $ jobCateId ) ) ; } else { $ jobCates = JobType :: all ( ) ; return view ( 'layouts.admin.job_and_relate.job_category.create' ) -> with ( 'jobtypes' , $ jobCates ) ; } }
Show the form for creating a new resource.
Show the form for creating a new resource .