create model method to get data laravel code example
Example 1: how to create model in laravel
php artisan make:model Flight
Example 2: create new record via model in laravel
$userData = array('username' => 'Me', 'email' => '[email protected]');
User::create($userData);