File: /home/imensosw/www/mpl.imenso.co/app/Console/Commands/SeedSteadfastUsers.php
<?php
namespace App\Console\Commands;
use App\Models\User;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Hash;
class SeedSteadfastUsers extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'mpl:seed-steadfast-users';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Seed Steadfast Collective test users.';
/**
* Execute the console command.
*
* @return int
*/
public function handle()
{
$this->info('Seeding Steadfast test users...');
// Venue 1
$venue = new User();
$venue->email = 'dev+venue@steadfastcollective.com';
$venue->password = Hash::make('password');
$venue->type_id = 1;
$venue->venue_name = 'Steadfast Venue';
$venue->clean_url = 'sf-venue';
$venue->lat = 55.864237;
$venue->lng = -4.251805999999988;
$venue->save();
// Band 2
$artist = new User();
$artist->email = 'dev+artist@steadfastcollective.com';
$artist->password = Hash::make('password');
$artist->type_id = 2;
$artist->artist_name = 'Steadfast Artist';
$artist->clean_url = 'sf-artist';
$artist->lat = 55.864237;
$artist->lng = -4.251805999999988;
$artist->save();
// Fan 3
$fan = new User();
$fan->first_name = 'Steadfast';
$fan->last_name = 'Fan';
$fan->email = 'dev+fan@steadfastcollective.com';
$fan->password = Hash::make('password');
$fan->type_id = 3;
$fan->clean_url = 'sf-fan';
$fan->lat = 55.864237;
$fan->lng = -4.251805999999988;
$fan->save();
// Promoter 4
$promoter = new User();
$promoter->promoter_name = 'Steadfast Promoter';
$promoter->email = 'dev+promoter@steadfastcollective.com';
$promoter->password = Hash::make('password');
$promoter->type_id = 4;
$promoter->clean_url = 'sf-promoter';
$promoter->lat = 55.864237;
$promoter->lng = -4.251805999999988;
$promoter->save();
// Global Promoter 4
$globalPromoter = new User();
$globalPromoter->promoter_name = 'Steadfast Global Promoter';
$globalPromoter->email = 'dev+globalpromoter@steadfastcollective.com';
$globalPromoter->password = Hash::make('password');
$globalPromoter->type_id = 4;
$globalPromoter->clean_url = 'sf-global-promoter';
$globalPromoter->lat = 55.864237;
$globalPromoter->lng = -4.251805999999988;
$globalPromoter->global_promoter = true;
$globalPromoter->save();
// Admin 5
$admin = new User();
$admin->first_name = 'Steadfast';
$admin->last_name = 'Admin';
$admin->email = 'dev+admin@steadfastcollective.com';
$admin->password = Hash::make('password');
$admin->type_id = 5;
$admin->clean_url = 'sf-admin';
$admin->save();
}
}