Skip to content

Commit

Permalink
email_verified_at on install user
Browse files Browse the repository at this point in the history
  • Loading branch information
3x1io committed Apr 24, 2024
1 parent b82917d commit 93ca737
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Console/TomatoRolesInstall.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace TomatoPHP\TomatoRoles\Console;

use App\Models\User;
use Carbon\Carbon;
use Illuminate\Console\Command;
use Spatie\Permission\Models\Role;
use TomatoPHP\ConsoleHelpers\Traits\HandleFiles;
Expand Down Expand Up @@ -50,9 +51,10 @@ public function handle(): void
$mainAccount = User::where('email', 'admin@admin.com')->first();
if(!$mainAccount){
$mainAccount = User::create([
'name' => 'Admin',
'name' => 'TomatoPHP',
'email' => 'admin@admin.com',
'password' => bcrypt('password')
'password' => bcrypt('password'),
"email_verified_at" => Carbon::now(),
]);

$role = Role::where('name', 'admin')->first();
Expand Down

0 comments on commit 93ca737

Please sign in to comment.