Loading...

consultas sql a la route

codes

consultas sql a la route



Route::get('/people', function () {
    $persons = DB::select("SELECT * FROM `people` WHERE `categoria` IN ('photographers', 'painters', 'influencers', 'music'); ");
    return view('people', compact('persons'));
});



Route::get('/dashboard', function()
{
    $persons = DB::table('people')->where('categoria', 'models')
                                ->orderBy('id', 'desc')
                                ->paginate(20);
    return View::make('dashboard')->with('persons', $persons);
})->name('dashboard');
© Your Site Name, All Right Reserved.
Designed By HTML Codex
Distributed By: ThemeWagon