Skip to content

Commit

Permalink
Merge pull request #20 from NickMous/feature/add-notifications
Browse files Browse the repository at this point in the history
Feature/add notifications
  • Loading branch information
NickMous authored Aug 7, 2024
2 parents 7e773ff + 8435676 commit 17bd81d
Show file tree
Hide file tree
Showing 11 changed files with 843 additions and 593 deletions.
2 changes: 1 addition & 1 deletion app/Console/Commands/AssignRole.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function promptForMissingArgumentsUsing()
{
return [
'user' => fn () => search('Select the user', fn ($value) => strlen($value) > 0
? User::all()->pluck('name', 'id')->toArray()
? User::pluck('name', 'id')->toArray()
: []),
'role' => fn () => $this->choice('Select the role', ['admin']),
];
Expand Down
2 changes: 1 addition & 1 deletion app/Console/Commands/SendTestNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ protected function promptForMissingArgumentsUsing()
{
return [
'user' => fn () => search('Select the user', fn ($value) => strlen($value) > 0
? User::all()->pluck('name', 'id')->toArray()
? User::pluck('name', 'id')->toArray()
: []),
'status' => fn () => $this->choice('Select the status', ['success', 'error']),
];
Expand Down
4 changes: 2 additions & 2 deletions app/Notifications/TestNotification.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function toArray(object $notifiable): array
'message' => 'This is a test notification',
'url' => 'https://example.com',
'icon' => 'fas fa-bell',
'status' => 'success',
'status' => $this->status,
],
];
}
Expand All @@ -67,7 +67,7 @@ public function toBroadcast(object $notifiable): array
'message' => 'This is a test notification',
'url' => 'https://example.com',
'icon' => 'fas fa-bell',
'status' => 'success',
'status' => $this->status,
];
}
}
4 changes: 3 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@
},
"require-dev": {
"fakerphp/faker": "^1.23.1",
"larastan/larastan": "^2.0",
"laravel/pint": "^1.16",
"laravel/sail": "^1.29.1",
"mockery/mockery": "^1.6.11",
"nunomaduro/collision": "^8.1.1",
"pestphp/pest": "^2.34.7",
"pestphp/pest-plugin-laravel": "^2.4",
"spatie/laravel-ignition": "^2.7"
"spatie/laravel-ignition": "^2.7",
"squizlabs/php_codesniffer": "^3.10"
},
"autoload": {
"psr-4": {
Expand Down
Loading

0 comments on commit 17bd81d

Please sign in to comment.