laravel 7 insert with model code example
Example 1: laravel fillable
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'title',
'slug',
'body',
'image',
'published',
'comments_open'
];
Example 2: create new record via model in laravel
$userData = array('username' => 'Me', 'email' => '[email protected]');
User::create($userData);