28 lines
670 B
PHP
28 lines
670 B
PHP
<?php
|
|
|
|
use Illuminate\Database\Seeder;
|
|
|
|
class UserSeeder extends Seeder
|
|
{
|
|
/**
|
|
* Run the database seeds.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function run()
|
|
{
|
|
$api_token = Str::random(60);
|
|
$web_client_name = env('WEB_CLIENT_NAME', 'web');
|
|
|
|
DB::table('users')->insert([
|
|
'name' => $web_client_name,
|
|
'email' => env('WEB_CLIENT_EMAIL', 'informaticamps@buzon.uy'),
|
|
'password' => Hash::make(env('WEB_CLIENT_PASS', 'pass')),
|
|
'api_token' => $api_token
|
|
]);
|
|
dump('Api token for ' . $web_client_name . ' is: ' . $api_token);
|
|
|
|
$api_token = Str::random(60);
|
|
}
|
|
}
|