“Zdobądź ostatni identyfikator Laravela” Kod odpowiedzi

Zdobądź ostatni identyfikator Laravela

$last3 = DB::table('items')->latest('id')->first();
Awful Albatross

Zdobądź ostatni identyfikator Laravela

$last = DB::table('items')->latest()->first();
Awful Albatross

Zwrot ostatniego wstawionego identyfikatora w Laravel

DB::getPdo()->lastInsertId();
Selfish Seahorse

Zwrot ostatniego wstawionego identyfikatora w Laravel

$id = DB::table('users')->insertGetId([
    'email' => '[email protected]',
    'votes' => 0
]);
Selfish Seahorse

Laravel otrzymuje ostatni identyfikator

DB::table('myTable')->orderBy('id','desc')->first();
Thibaudkhan

Zdobądź ostatni identyfikator Laravela

$last2 = DB::table('items')->orderBy('id', 'DESC')->first();
Awful Albatross

Odpowiedzi podobne do “Zdobądź ostatni identyfikator Laravela”

Pytania podobne do “Zdobądź ostatni identyfikator Laravela”

Więcej pokrewnych odpowiedzi na “Zdobądź ostatni identyfikator Laravela” w PHP

Przeglądaj popularne odpowiedzi na kod według języka

Przeglądaj inne języki kodu