@@ -21,7 +21,6 @@ |
||
21 | 21 | /** |
22 | 22 | * Unsubscribe from a search by deleting it. |
23 | 23 | * |
24 | - * @param SearchRepositoryInterface $users |
|
25 | 24 | * |
26 | 25 | * @return FlashMessage |
27 | 26 | */ |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function via($notifiable) |
45 | 45 | { |
46 | - return ['mail', 'database']; |
|
46 | + return [ 'mail', 'database' ]; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -68,8 +68,8 @@ discard block |
||
68 | 68 | $count = count($this->jobs); |
69 | 69 | $message = new JobMailMessage(); |
70 | 70 | // Add user and search ID to view data |
71 | - $message->viewData['user_id'] = $notifiable->id; |
|
72 | - $message->viewData['search_id'] = $this->search->id; |
|
71 | + $message->viewData[ 'user_id' ] = $notifiable->id; |
|
72 | + $message->viewData[ 'search_id' ] = $this->search->id; |
|
73 | 73 | // Update the message and subject |
74 | 74 | $message->subject($count.' job listings found especially for you') |
75 | 75 | ->greeting('Hello,') |
@@ -68,7 +68,7 @@ |
||
68 | 68 | $results = $this->dispatchNow(new GetUserSearches($userId)); |
69 | 69 | |
70 | 70 | if (!$results->isEmpty()) { |
71 | - return view('searches.index', ['searches' => $results]); |
|
71 | + return view('searches.index', [ 'searches' => $results ]); |
|
72 | 72 | } |
73 | 73 | |
74 | 74 | return redirect('/'); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | { |
34 | 34 | parent::boot(); |
35 | 35 | |
36 | - static::creating(function ($model) { |
|
36 | + static::creating(function($model) { |
|
37 | 37 | $model->{$model->getKeyName()} = Uuid::uuid4(); |
38 | 38 | }); |
39 | 39 | } |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function scopeActive($query) |
57 | 57 | { |
58 | - return $query->whereHas('user', function ($query) { |
|
58 | + return $query->whereHas('user', function($query) { |
|
59 | 59 | return $query->confirmed(); |
60 | 60 | }); |
61 | 61 | } |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | */ |
68 | 68 | public function scopeWhereUserEmail($query, $email = null) |
69 | 69 | { |
70 | - return $query->whereHas('user', function ($query) use ($email) { |
|
70 | + return $query->whereHas('user', function($query) use ($email) { |
|
71 | 71 | return $query->where('email', $email); |
72 | 72 | }); |
73 | 73 | } |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | public function scopeWhereUserId($query, $id = null) |
81 | 81 | { |
82 | - return $query->whereHas('user', function ($query) use ($id) { |
|
82 | + return $query->whereHas('user', function($query) use ($id) { |
|
83 | 83 | return $query->where('id', $id); |
84 | 84 | }); |
85 | 85 | } |
@@ -2,11 +2,11 @@ discard block |
||
2 | 2 | |
3 | 3 | Route::get('/', 'UsersController@index'); |
4 | 4 | |
5 | -Route::get('/terms', function () { |
|
5 | +Route::get('/terms', function() { |
|
6 | 6 | return view('static.terms'); |
7 | 7 | }); |
8 | 8 | |
9 | -Route::group(['prefix' => 'users'], function () { |
|
9 | +Route::group([ 'prefix' => 'users' ], function() { |
|
10 | 10 | |
11 | 11 | // Create new user |
12 | 12 | Route::post('/', 'UsersController@create'); |
@@ -21,7 +21,7 @@ discard block |
||
21 | 21 | Route::get('/{userId}/searches', 'UsersController@searches'); |
22 | 22 | }); |
23 | 23 | |
24 | -Route::group(['prefix' => 'searches'], function () { |
|
24 | +Route::group([ 'prefix' => 'searches' ], function() { |
|
25 | 25 | |
26 | 26 | // Unsubscribe by ID |
27 | 27 | Route::get('/{searchId}/unsubscribe', 'SearchesController@unsubscribe'); |