If we use ->get()->paginate() it will always throw the error like as below
“BadMethodCallException in Macroable.php line 81: Method paginate does not exist,”
See the usage in the below sample code
1 2 3 4 |
$details_data =system_management::where('id', '=', $id) ->where('f_name', '==', 'vasanthan') ->where('l_name', '!=', 'pv') ->get()->paginate(5); |
Above script will not work.if you are using paginate() then no need to use tge get() function in the query.So correct format is,
1 2 3 4 |
$details_data =system_management::where('id', '=', $id) ->where('f_name', '==', 'vasanthan') ->where('l_name', '!=', 'pv') ->paginate(5); |