Answers for "select one row from large amount of data in laravel eloquent"

PHP
0

how to get data from a table in laravel

use Illuminate\Support\Facades\DB;

class UserController extends Controller
{
    public function index()
    {
        $users = DB::table('users')->select('id','name','email')->get();

        return view('some-view')->with('users', $users);
    }
}
Posted by: Guest on October-22-2020
-1

DB::table('users')->get();

DB::select('select * from users ');
Posted by: Guest on October-22-2020

Code answers related to "select one row from large amount of data in laravel eloquent"

Browse Popular Code Answers by Language