@@ -11,9 +11,9 @@ |
||
| 11 | 11 | $notifications = request()->user()->notifications() |
| 12 | 12 | ->orderByDesc('created_at'); |
| 13 | 13 | |
| 14 | - $only = config('nova_notifications.only', []); |
|
| 14 | + $only = config('nova_notifications.only', [ ]); |
|
| 15 | 15 | |
| 16 | - if (! empty($only)) { |
|
| 16 | + if (!empty($only)) { |
|
| 17 | 17 | $notifications->whereIn('type', $only); |
| 18 | 18 | } |
| 19 | 19 | |
@@ -18,11 +18,11 @@ discard block |
||
| 18 | 18 | { |
| 19 | 19 | $this->loadViewsFrom(__DIR__ . '/../resources/views', 'nova_notification_feed'); |
| 20 | 20 | |
| 21 | - $this->app->booted(function () { |
|
| 21 | + $this->app->booted(function() { |
|
| 22 | 22 | $this->routes(); |
| 23 | 23 | }); |
| 24 | 24 | |
| 25 | - Nova::serving(function (ServingNova $event) { |
|
| 25 | + Nova::serving(function(ServingNova $event) { |
|
| 26 | 26 | // |
| 27 | 27 | }); |
| 28 | 28 | |
@@ -41,12 +41,12 @@ discard block |
||
| 41 | 41 | return; |
| 42 | 42 | } |
| 43 | 43 | |
| 44 | - Route::middleware(['nova']) |
|
| 44 | + Route::middleware([ 'nova' ]) |
|
| 45 | 45 | ->prefix('nova-vendor/nova-notifications') |
| 46 | 46 | ->namespace('Coreproc\NovaNotificationFeed\Http\Controllers') |
| 47 | 47 | ->group(__DIR__ . '/../routes/api.php'); |
| 48 | 48 | |
| 49 | - Route::middleware(['nova']) |
|
| 49 | + Route::middleware([ 'nova' ]) |
|
| 50 | 50 | ->prefix('nova-vendor/nova-notifications') |
| 51 | 51 | ->group(__DIR__ . '/../routes/channels.php'); |
| 52 | 52 | } |
@@ -11,6 +11,6 @@ |
||
| 11 | 11 | | |
| 12 | 12 | */ |
| 13 | 13 | |
| 14 | -Broadcast::channel('nova-notifications.{id}', function ($user, $id) { |
|
| 14 | +Broadcast::channel('nova-notifications.{id}', function($user, $id) { |
|
| 15 | 15 | return (int)$user->id === (int)$id; |
| 16 | 16 | }); |
@@ -16,8 +16,8 @@ |
||
| 16 | 16 | { |
| 17 | 17 | return [ |
| 18 | 18 | 'data' => $this->data, |
| 19 | - 'read_at' => ! empty($this->read_at) ? $this->read_at->toDate() : null, |
|
| 20 | - 'created_at' => ! empty($this->created_at) ? $this->created_at->toDate() : null, |
|
| 19 | + 'read_at' => !empty($this->read_at) ? $this->read_at->toDate() : null, |
|
| 20 | + 'created_at' => !empty($this->created_at) ? $this->created_at->toDate() : null, |
|
| 21 | 21 | ]; |
| 22 | 22 | } |
| 23 | 23 | } |