app/Http/Controllers/TeamsController.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 )
    {
        $limit = 1000;
        $search_term = $request->input( 'search', false );
        if ( $search_term ) {
            $teams = Team::where( 'team_name', 'ilike', '%' . $search_term . '%' )->orderBy('team_name')->paginate( $limit );
        } else {
            $teams = Team::orderBy( 'team_name' )->paginate( $limit );
        }
        return view( 'project1.viewAllTeams ', compact( 'teams' ) );
    }
public function index ( Request $ request ) { $ limit = 1000 ; $ search_term = $ request -> input ( 'search' , false ) ; if ( $ search_term ) { $ teams = Team :: where ( 'team_name' , 'ilike' , '%' . $ search_term . '%' ) -> orderBy ( 'team_name' ) -> paginate ( $ limit ) ; } else { $ teams = Team :: orderBy ( 'team_name' ) -> paginate ( $ limit ) ; } return view ( 'project1.viewAllTeams ' , compact ( 'teams' ) ) ; }
Display a listing of the resource.
Display a listing of the resource .