app/Http/Controllers/CompanyController.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)
    {
        $companies = Company::paginate(10);
        if($request->isXmlHttpRequest()) {
            return response(
                view('layouts.admin.job_and_relate.company.table', ['comps' => $companies, 'count' => count($companies)]),
                200,
                ['Content-Type', 'application/json']
            );
        }
        return view('layouts.admin.job_and_relate.company.index')
            ->with('comps', $companies)
            ->with('count', count($companies));
    }
public function index ( Request $ request ) { $ companies = Company :: paginate ( 10 ) ; if ( $ request -> isXmlHttpRequest ( ) ) { return response ( view ( 'layouts.admin.job_and_relate.company.table' , [ 'comps' => $ companies , 'count' => count ( $ companies ) ] ) , 200 , [ 'Content-Type' , 'application/json' ] ) ; } return view ( 'layouts.admin.job_and_relate.company.index' ) -> with ( 'comps' , $ companies ) -> with ( 'count' , count ( $ companies ) ) ; }
Display a listing of the resource.
Display a listing of the resource .