Answers for "laravel whereid"

PHP
0

insertgetid laravel 8

/**
* The attributes that are mass assignable.
*
* @var array
*/
public function index()
{
	$id = DB::table('users')->insertGetId(
            ['email' => '[email protected]','name' => 'john']
        );
}
Posted by: Guest on May-20-2021
0

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

$users = DB::table('users')where('id','=', $userid)->get();
Posted by: Guest on October-22-2020

Browse Popular Code Answers by Language