app/Http/Controllers/CompaniesController.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()
    {
        $companies = Companies::all()->paginate(10);
        return view('companies.index', compact('companies'))
            ->with('i', (request()->input('page', 1) - 1) * 10);
    }
public function index ( ) { $ companies = Companies :: all ( ) -> paginate ( 10 ) ; return view ( 'companies.index' , compact ( 'companies' ) ) -> with ( 'i' , ( request ( ) -> input ( 'page' , 1 ) - 1 ) * 10 ) ; }
Display a listing of the resource.
Display a listing of the resource .