While you could use curl to accomplish this, Laravel actually has built in functionality for this, called Seeding.
Essentially, you'd do something like this:
php artisan make:seeder UsersTableSeeder
Then edit your UsersTableSeeder file:
<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('users')->insert([
'name' => str_random(10),
'email' => str_random(10).'@gmail.com',
'password' => bcrypt('secret'),
]);
}
}
Then finally: php artisan db:seed
Follow the link above for more information about it, as I gave you a very basic example.