You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've got a simple Artisan command that consumes this library.
The command works as intended when invoked directly from the command line (ex: php artisan post-migrate:members).
public function handle()
{
Console::section('section')->info('Converting all the NON-MEMBERS to MEMBERS');
Console::section('section')->withProgressBar(
["Everything happens in a single batch so we don't need an iterator here"],
fn($value, $bar) => $this->makeNonMembersIntoMembers($value, $bar)
);
}
public function makeNonMembersIntoMembers($value, $bar): void
{
User::whereRole(User::ROLE_NON_MEMBER)->update([
'role' => User::ROLE_MEMBER
]);
}
I'm now trying to automatically invoke this command from my DatabaseSeeder.php using Artisan::call('post-migrate:members'); and it's producing an error (see attached screenshot).
The text was updated successfully, but these errors were encountered:
I've got a simple Artisan command that consumes this library.
The command works as intended when invoked directly from the command line (ex:
php artisan post-migrate:members
).I'm now trying to automatically invoke this command from my DatabaseSeeder.php using
Artisan::call('post-migrate:members');
and it's producing an error (see attached screenshot).The text was updated successfully, but these errors were encountered: