app/Http/Controllers/JobTypeController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index(Request $request)
    {
        $jobTypes = JobType::paginate(10);
        if($request->isXmlHttpRequest()) {
            return response(
                view('layouts.admin.job_and_relate.job_type.table', ['jobTypes' => $jobTypes]),
                200,
                ['Content-Type', 'application/json']
            );
        }
        return view('layouts.admin.job_and_relate.job_type.index')->with('jobTypes', $jobTypes);
    }
public function index ( Request $ request ) { $ jobTypes = JobType :: paginate ( 10 ) ; if ( $ request -> isXmlHttpRequest ( ) ) { return response ( view ( 'layouts.admin.job_and_relate.job_type.table' , [ 'jobTypes' => $ jobTypes ] ) , 200 , [ 'Content-Type' , 'application/json' ] ) ; } return view ( 'layouts.admin.job_and_relate.job_type.index' ) -> with ( 'jobTypes' , $ jobTypes ) ; }
Display a listing of the resource.
Display a listing of the resource .