Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

insertgetid laravel 8

/**
* The attributes that are mass assignable.
*
* @var array
*/
public function index()
{
	$id = DB::table('users')->insertGetId(
            ['email' => 'john@example.com','name' => 'john']
        );
}
Source by www.nicesnippets.com #
 
PREVIOUS NEXT
Tagged: #insertgetid #laravel
ADD COMMENT
Topic
Name
5+7 =