@@ -6,16 +6,16 @@ |
||
| 6 | 6 | |
| 7 | 7 | class NotificationsDatabaseSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - $this->call(ClearDataSeeder::class); |
|
| 17 | - $this->call(NotificationsTableSeeder::class); |
|
| 18 | - $this->call(PushNotificationsDevicesTableSeeder::class); |
|
| 19 | - $this->call(AssignRelationsSeeder::class); |
|
| 20 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + $this->call(ClearDataSeeder::class); |
|
| 17 | + $this->call(NotificationsTableSeeder::class); |
|
| 18 | + $this->call(PushNotificationsDevicesTableSeeder::class); |
|
| 19 | + $this->call(AssignRelationsSeeder::class); |
|
| 20 | + } |
|
| 21 | 21 | } |
@@ -6,46 +6,46 @@ |
||
| 6 | 6 | |
| 7 | 7 | class NotificationsTableSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - /** |
|
| 17 | - * Insert the permissions related to settings table. |
|
| 18 | - */ |
|
| 19 | - \DB::table('permissions')->insert( |
|
| 20 | - [ |
|
| 21 | - /** |
|
| 22 | - * notifications model permissions. |
|
| 23 | - */ |
|
| 24 | - [ |
|
| 25 | - 'name' => 'all', |
|
| 26 | - 'model' => 'notifications', |
|
| 27 | - 'created_at' => \DB::raw('NOW()'), |
|
| 28 | - 'updated_at' => \DB::raw('NOW()') |
|
| 29 | - ], |
|
| 30 | - [ |
|
| 31 | - 'name' => 'unread', |
|
| 32 | - 'model' => 'notifications', |
|
| 33 | - 'created_at' => \DB::raw('NOW()'), |
|
| 34 | - 'updated_at' => \DB::raw('NOW()') |
|
| 35 | - ], |
|
| 36 | - [ |
|
| 37 | - 'name' => 'markAsRead', |
|
| 38 | - 'model' => 'notifications', |
|
| 39 | - 'created_at' => \DB::raw('NOW()'), |
|
| 40 | - 'updated_at' => \DB::raw('NOW()') |
|
| 41 | - ], |
|
| 42 | - [ |
|
| 43 | - 'name' => 'markAllAsRead', |
|
| 44 | - 'model' => 'notifications', |
|
| 45 | - 'created_at' => \DB::raw('NOW()'), |
|
| 46 | - 'updated_at' => \DB::raw('NOW()') |
|
| 47 | - ] |
|
| 48 | - ] |
|
| 49 | - ); |
|
| 50 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + /** |
|
| 17 | + * Insert the permissions related to settings table. |
|
| 18 | + */ |
|
| 19 | + \DB::table('permissions')->insert( |
|
| 20 | + [ |
|
| 21 | + /** |
|
| 22 | + * notifications model permissions. |
|
| 23 | + */ |
|
| 24 | + [ |
|
| 25 | + 'name' => 'all', |
|
| 26 | + 'model' => 'notifications', |
|
| 27 | + 'created_at' => \DB::raw('NOW()'), |
|
| 28 | + 'updated_at' => \DB::raw('NOW()') |
|
| 29 | + ], |
|
| 30 | + [ |
|
| 31 | + 'name' => 'unread', |
|
| 32 | + 'model' => 'notifications', |
|
| 33 | + 'created_at' => \DB::raw('NOW()'), |
|
| 34 | + 'updated_at' => \DB::raw('NOW()') |
|
| 35 | + ], |
|
| 36 | + [ |
|
| 37 | + 'name' => 'markAsRead', |
|
| 38 | + 'model' => 'notifications', |
|
| 39 | + 'created_at' => \DB::raw('NOW()'), |
|
| 40 | + 'updated_at' => \DB::raw('NOW()') |
|
| 41 | + ], |
|
| 42 | + [ |
|
| 43 | + 'name' => 'markAllAsRead', |
|
| 44 | + 'model' => 'notifications', |
|
| 45 | + 'created_at' => \DB::raw('NOW()'), |
|
| 46 | + 'updated_at' => \DB::raw('NOW()') |
|
| 47 | + ] |
|
| 48 | + ] |
|
| 49 | + ); |
|
| 50 | + } |
|
| 51 | 51 | } |
@@ -6,88 +6,88 @@ |
||
| 6 | 6 | |
| 7 | 7 | class PushNotificationsDevicesTableSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - /** |
|
| 17 | - * Insert the permissions related to settings table. |
|
| 18 | - */ |
|
| 19 | - \DB::table('permissions')->insert( |
|
| 20 | - [ |
|
| 21 | - /** |
|
| 22 | - * pushNotificationDevices model permissions. |
|
| 23 | - */ |
|
| 24 | - [ |
|
| 25 | - 'name' => 'find', |
|
| 26 | - 'model' => 'pushNotificationDevices', |
|
| 27 | - 'created_at' => \DB::raw('NOW()'), |
|
| 28 | - 'updated_at' => \DB::raw('NOW()') |
|
| 29 | - ], |
|
| 30 | - [ |
|
| 31 | - 'name' => 'search', |
|
| 32 | - 'model' => 'pushNotificationDevices', |
|
| 33 | - 'created_at' => \DB::raw('NOW()'), |
|
| 34 | - 'updated_at' => \DB::raw('NOW()') |
|
| 35 | - ], |
|
| 36 | - [ |
|
| 37 | - 'name' => 'list', |
|
| 38 | - 'model' => 'pushNotificationDevices', |
|
| 39 | - 'created_at' => \DB::raw('NOW()'), |
|
| 40 | - 'updated_at' => \DB::raw('NOW()') |
|
| 41 | - ], |
|
| 42 | - [ |
|
| 43 | - 'name' => 'findby', |
|
| 44 | - 'model' => 'pushNotificationDevices', |
|
| 45 | - 'created_at' => \DB::raw('NOW()'), |
|
| 46 | - 'updated_at' => \DB::raw('NOW()') |
|
| 47 | - ], |
|
| 48 | - [ |
|
| 49 | - 'name' => 'first', |
|
| 50 | - 'model' => 'pushNotificationDevices', |
|
| 51 | - 'created_at' => \DB::raw('NOW()'), |
|
| 52 | - 'updated_at' => \DB::raw('NOW()') |
|
| 53 | - ], |
|
| 54 | - [ |
|
| 55 | - 'name' => 'paginate', |
|
| 56 | - 'model' => 'pushNotificationDevices', |
|
| 57 | - 'created_at' => \DB::raw('NOW()'), |
|
| 58 | - 'updated_at' => \DB::raw('NOW()') |
|
| 59 | - ], |
|
| 60 | - [ |
|
| 61 | - 'name' => 'paginateby', |
|
| 62 | - 'model' => 'pushNotificationDevices', |
|
| 63 | - 'created_at' => \DB::raw('NOW()'), |
|
| 64 | - 'updated_at' => \DB::raw('NOW()') |
|
| 65 | - ], |
|
| 66 | - [ |
|
| 67 | - 'name' => 'save', |
|
| 68 | - 'model' => 'pushNotificationDevices', |
|
| 69 | - 'created_at' => \DB::raw('NOW()'), |
|
| 70 | - 'updated_at' => \DB::raw('NOW()') |
|
| 71 | - ], |
|
| 72 | - [ |
|
| 73 | - 'name' => 'delete', |
|
| 74 | - 'model' => 'pushNotificationDevices', |
|
| 75 | - 'created_at' => \DB::raw('NOW()'), |
|
| 76 | - 'updated_at' => \DB::raw('NOW()') |
|
| 77 | - ], |
|
| 78 | - [ |
|
| 79 | - 'name' => 'deleted', |
|
| 80 | - 'model' => 'pushNotificationDevices', |
|
| 81 | - 'created_at' => \DB::raw('NOW()'), |
|
| 82 | - 'updated_at' => \DB::raw('NOW()') |
|
| 83 | - ], |
|
| 84 | - [ |
|
| 85 | - 'name' => 'restore', |
|
| 86 | - 'model' => 'pushNotificationDevices', |
|
| 87 | - 'created_at' => \DB::raw('NOW()'), |
|
| 88 | - 'updated_at' => \DB::raw('NOW()') |
|
| 89 | - ] |
|
| 90 | - ] |
|
| 91 | - ); |
|
| 92 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + /** |
|
| 17 | + * Insert the permissions related to settings table. |
|
| 18 | + */ |
|
| 19 | + \DB::table('permissions')->insert( |
|
| 20 | + [ |
|
| 21 | + /** |
|
| 22 | + * pushNotificationDevices model permissions. |
|
| 23 | + */ |
|
| 24 | + [ |
|
| 25 | + 'name' => 'find', |
|
| 26 | + 'model' => 'pushNotificationDevices', |
|
| 27 | + 'created_at' => \DB::raw('NOW()'), |
|
| 28 | + 'updated_at' => \DB::raw('NOW()') |
|
| 29 | + ], |
|
| 30 | + [ |
|
| 31 | + 'name' => 'search', |
|
| 32 | + 'model' => 'pushNotificationDevices', |
|
| 33 | + 'created_at' => \DB::raw('NOW()'), |
|
| 34 | + 'updated_at' => \DB::raw('NOW()') |
|
| 35 | + ], |
|
| 36 | + [ |
|
| 37 | + 'name' => 'list', |
|
| 38 | + 'model' => 'pushNotificationDevices', |
|
| 39 | + 'created_at' => \DB::raw('NOW()'), |
|
| 40 | + 'updated_at' => \DB::raw('NOW()') |
|
| 41 | + ], |
|
| 42 | + [ |
|
| 43 | + 'name' => 'findby', |
|
| 44 | + 'model' => 'pushNotificationDevices', |
|
| 45 | + 'created_at' => \DB::raw('NOW()'), |
|
| 46 | + 'updated_at' => \DB::raw('NOW()') |
|
| 47 | + ], |
|
| 48 | + [ |
|
| 49 | + 'name' => 'first', |
|
| 50 | + 'model' => 'pushNotificationDevices', |
|
| 51 | + 'created_at' => \DB::raw('NOW()'), |
|
| 52 | + 'updated_at' => \DB::raw('NOW()') |
|
| 53 | + ], |
|
| 54 | + [ |
|
| 55 | + 'name' => 'paginate', |
|
| 56 | + 'model' => 'pushNotificationDevices', |
|
| 57 | + 'created_at' => \DB::raw('NOW()'), |
|
| 58 | + 'updated_at' => \DB::raw('NOW()') |
|
| 59 | + ], |
|
| 60 | + [ |
|
| 61 | + 'name' => 'paginateby', |
|
| 62 | + 'model' => 'pushNotificationDevices', |
|
| 63 | + 'created_at' => \DB::raw('NOW()'), |
|
| 64 | + 'updated_at' => \DB::raw('NOW()') |
|
| 65 | + ], |
|
| 66 | + [ |
|
| 67 | + 'name' => 'save', |
|
| 68 | + 'model' => 'pushNotificationDevices', |
|
| 69 | + 'created_at' => \DB::raw('NOW()'), |
|
| 70 | + 'updated_at' => \DB::raw('NOW()') |
|
| 71 | + ], |
|
| 72 | + [ |
|
| 73 | + 'name' => 'delete', |
|
| 74 | + 'model' => 'pushNotificationDevices', |
|
| 75 | + 'created_at' => \DB::raw('NOW()'), |
|
| 76 | + 'updated_at' => \DB::raw('NOW()') |
|
| 77 | + ], |
|
| 78 | + [ |
|
| 79 | + 'name' => 'deleted', |
|
| 80 | + 'model' => 'pushNotificationDevices', |
|
| 81 | + 'created_at' => \DB::raw('NOW()'), |
|
| 82 | + 'updated_at' => \DB::raw('NOW()') |
|
| 83 | + ], |
|
| 84 | + [ |
|
| 85 | + 'name' => 'restore', |
|
| 86 | + 'model' => 'pushNotificationDevices', |
|
| 87 | + 'created_at' => \DB::raw('NOW()'), |
|
| 88 | + 'updated_at' => \DB::raw('NOW()') |
|
| 89 | + ] |
|
| 90 | + ] |
|
| 91 | + ); |
|
| 92 | + } |
|
| 93 | 93 | } |
@@ -6,15 +6,15 @@ |
||
| 6 | 6 | |
| 7 | 7 | class ClearDataSeeder extends Seeder |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the database seeds. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function run() |
|
| 15 | - { |
|
| 16 | - $permissions = \DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
| 17 | - \DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
|
| 18 | - $permissions->delete(); |
|
| 19 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the database seeds. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function run() |
|
| 15 | + { |
|
| 16 | + $permissions = \DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
| 17 | + \DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
|
| 18 | + $permissions->delete(); |
|
| 19 | + } |
|
| 20 | 20 | } |
@@ -7,60 +7,60 @@ |
||
| 7 | 7 | |
| 8 | 8 | class NotificationsController extends BaseApiController |
| 9 | 9 | { |
| 10 | - /** |
|
| 11 | - * The name of the model that is used by the base api controller |
|
| 12 | - * to preform actions like (add, edit ... etc). |
|
| 13 | - * @var string |
|
| 14 | - */ |
|
| 15 | - protected $model = 'notifications'; |
|
| 10 | + /** |
|
| 11 | + * The name of the model that is used by the base api controller |
|
| 12 | + * to preform actions like (add, edit ... etc). |
|
| 13 | + * @var string |
|
| 14 | + */ |
|
| 15 | + protected $model = 'notifications'; |
|
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * List of all route actions that the base api controller |
|
| 19 | - * will skip permissions check for them. |
|
| 20 | - * @var array |
|
| 21 | - */ |
|
| 22 | - protected $skipPermissionCheck = ['markAsRead', 'markAllAsRead', 'list', 'unread']; |
|
| 17 | + /** |
|
| 18 | + * List of all route actions that the base api controller |
|
| 19 | + * will skip permissions check for them. |
|
| 20 | + * @var array |
|
| 21 | + */ |
|
| 22 | + protected $skipPermissionCheck = ['markAsRead', 'markAllAsRead', 'list', 'unread']; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Retrieve all notifications of the logged in user. |
|
| 26 | - * |
|
| 27 | - * @param integer $perPage Number of rows per page default all data. |
|
| 28 | - * @return \Illuminate\Http\Response |
|
| 29 | - */ |
|
| 30 | - public function list($perPage = 0) |
|
| 31 | - { |
|
| 32 | - return \Response::json($this->repo->list($perPage), 200); |
|
| 33 | - } |
|
| 24 | + /** |
|
| 25 | + * Retrieve all notifications of the logged in user. |
|
| 26 | + * |
|
| 27 | + * @param integer $perPage Number of rows per page default all data. |
|
| 28 | + * @return \Illuminate\Http\Response |
|
| 29 | + */ |
|
| 30 | + public function list($perPage = 0) |
|
| 31 | + { |
|
| 32 | + return \Response::json($this->repo->list($perPage), 200); |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Retrieve unread notifications of the logged in user. |
|
| 37 | - * |
|
| 38 | - * @param integer $perPage Number of rows per page default all data. |
|
| 39 | - * @return \Illuminate\Http\Response |
|
| 40 | - */ |
|
| 41 | - public function unread($perPage = 0) |
|
| 42 | - { |
|
| 43 | - return \Response::json($this->repo->unread($perPage), 200); |
|
| 44 | - } |
|
| 35 | + /** |
|
| 36 | + * Retrieve unread notifications of the logged in user. |
|
| 37 | + * |
|
| 38 | + * @param integer $perPage Number of rows per page default all data. |
|
| 39 | + * @return \Illuminate\Http\Response |
|
| 40 | + */ |
|
| 41 | + public function unread($perPage = 0) |
|
| 42 | + { |
|
| 43 | + return \Response::json($this->repo->unread($perPage), 200); |
|
| 44 | + } |
|
| 45 | 45 | |
| 46 | - /** |
|
| 47 | - * Mark the notification as read. |
|
| 48 | - * |
|
| 49 | - * @param integer $id Id of the notification. |
|
| 50 | - * @return \Illuminate\Http\Response |
|
| 51 | - */ |
|
| 52 | - public function markAsRead($id) |
|
| 53 | - { |
|
| 54 | - return \Response::json($this->repo->markAsRead($id), 200); |
|
| 55 | - } |
|
| 46 | + /** |
|
| 47 | + * Mark the notification as read. |
|
| 48 | + * |
|
| 49 | + * @param integer $id Id of the notification. |
|
| 50 | + * @return \Illuminate\Http\Response |
|
| 51 | + */ |
|
| 52 | + public function markAsRead($id) |
|
| 53 | + { |
|
| 54 | + return \Response::json($this->repo->markAsRead($id), 200); |
|
| 55 | + } |
|
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * Mark all notifications as read. |
|
| 59 | - * |
|
| 60 | - * @return \Illuminate\Http\Response |
|
| 61 | - */ |
|
| 62 | - public function markAllAsRead() |
|
| 63 | - { |
|
| 64 | - return \Response::json($this->repo->markAllAsRead(), 200); |
|
| 65 | - } |
|
| 57 | + /** |
|
| 58 | + * Mark all notifications as read. |
|
| 59 | + * |
|
| 60 | + * @return \Illuminate\Http\Response |
|
| 61 | + */ |
|
| 62 | + public function markAllAsRead() |
|
| 63 | + { |
|
| 64 | + return \Response::json($this->repo->markAllAsRead(), 200); |
|
| 65 | + } |
|
| 66 | 66 | } |
@@ -7,42 +7,42 @@ |
||
| 7 | 7 | |
| 8 | 8 | class PushNotificationsDevicesController extends BaseApiController |
| 9 | 9 | { |
| 10 | - /** |
|
| 11 | - * The name of the model that is used by the base api controller |
|
| 12 | - * to preform actions like (add, edit ... etc). |
|
| 13 | - * @var string |
|
| 14 | - */ |
|
| 15 | - protected $model = 'pushNotificationDevices'; |
|
| 10 | + /** |
|
| 11 | + * The name of the model that is used by the base api controller |
|
| 12 | + * to preform actions like (add, edit ... etc). |
|
| 13 | + * @var string |
|
| 14 | + */ |
|
| 15 | + protected $model = 'pushNotificationDevices'; |
|
| 16 | 16 | |
| 17 | - /** |
|
| 18 | - * List of all route actions that the base api controller |
|
| 19 | - * will skip permissions check for them. |
|
| 20 | - * @var array |
|
| 21 | - */ |
|
| 22 | - protected $skipPermissionCheck = ['registerDevice']; |
|
| 17 | + /** |
|
| 18 | + * List of all route actions that the base api controller |
|
| 19 | + * will skip permissions check for them. |
|
| 20 | + * @var array |
|
| 21 | + */ |
|
| 22 | + protected $skipPermissionCheck = ['registerDevice']; |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * The validations rules used by the base api controller |
|
| 26 | - * to check before add. |
|
| 27 | - * @var array |
|
| 28 | - */ |
|
| 29 | - protected $validationRules = [ |
|
| 30 | - 'device_token' => 'required|string|max:255', |
|
| 31 | - 'user_id' => 'required|exists:users,id' |
|
| 32 | - ]; |
|
| 24 | + /** |
|
| 25 | + * The validations rules used by the base api controller |
|
| 26 | + * to check before add. |
|
| 27 | + * @var array |
|
| 28 | + */ |
|
| 29 | + protected $validationRules = [ |
|
| 30 | + 'device_token' => 'required|string|max:255', |
|
| 31 | + 'user_id' => 'required|exists:users,id' |
|
| 32 | + ]; |
|
| 33 | 33 | |
| 34 | - /** |
|
| 35 | - * Register the given device to the logged in user. |
|
| 36 | - * |
|
| 37 | - * @param \Illuminate\Http\Request $request |
|
| 38 | - * @return \Illuminate\Http\Response |
|
| 39 | - */ |
|
| 40 | - public function registerDevice(Request $request) |
|
| 41 | - { |
|
| 42 | - $this->validate($request, [ |
|
| 43 | - 'device_token' => 'required|string|max:255' |
|
| 44 | - ]); |
|
| 34 | + /** |
|
| 35 | + * Register the given device to the logged in user. |
|
| 36 | + * |
|
| 37 | + * @param \Illuminate\Http\Request $request |
|
| 38 | + * @return \Illuminate\Http\Response |
|
| 39 | + */ |
|
| 40 | + public function registerDevice(Request $request) |
|
| 41 | + { |
|
| 42 | + $this->validate($request, [ |
|
| 43 | + 'device_token' => 'required|string|max:255' |
|
| 44 | + ]); |
|
| 45 | 45 | |
| 46 | - return \Response::json($this->repo->registerDevice($request->all()), 200); |
|
| 47 | - } |
|
| 46 | + return \Response::json($this->repo->registerDevice($request->all()), 200); |
|
| 47 | + } |
|
| 48 | 48 | } |
@@ -9,39 +9,39 @@ |
||
| 9 | 9 | |
| 10 | 10 | class ConfirmEmail extends Notification implements ShouldQueue |
| 11 | 11 | { |
| 12 | - use Queueable; |
|
| 12 | + use Queueable; |
|
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * Create a new notification instance. |
|
| 16 | - */ |
|
| 17 | - public function __construct() |
|
| 18 | - { |
|
| 19 | - // |
|
| 20 | - } |
|
| 14 | + /** |
|
| 15 | + * Create a new notification instance. |
|
| 16 | + */ |
|
| 17 | + public function __construct() |
|
| 18 | + { |
|
| 19 | + // |
|
| 20 | + } |
|
| 21 | 21 | |
| 22 | - /** |
|
| 23 | - * Get the notification's delivery channels. |
|
| 24 | - * |
|
| 25 | - * @param mixed $notifiable |
|
| 26 | - * @return string[] |
|
| 27 | - */ |
|
| 28 | - public function via($notifiable) |
|
| 29 | - { |
|
| 30 | - return ['mail']; |
|
| 31 | - } |
|
| 22 | + /** |
|
| 23 | + * Get the notification's delivery channels. |
|
| 24 | + * |
|
| 25 | + * @param mixed $notifiable |
|
| 26 | + * @return string[] |
|
| 27 | + */ |
|
| 28 | + public function via($notifiable) |
|
| 29 | + { |
|
| 30 | + return ['mail']; |
|
| 31 | + } |
|
| 32 | 32 | |
| 33 | - /** |
|
| 34 | - * Get the mail representation of the notification. |
|
| 35 | - * |
|
| 36 | - * @param mixed $notifiable |
|
| 37 | - * @return \Illuminate\Notifications\Messages\MailMessage |
|
| 38 | - */ |
|
| 39 | - public function toMail($notifiable) |
|
| 40 | - { |
|
| 41 | - return (new MailMessage) |
|
| 42 | - ->subject('Email verification') |
|
| 43 | - ->line('Email verification') |
|
| 44 | - ->line('To validate your email click on the button below') |
|
| 45 | - ->action('Verify your email', config('skeleton.confrim_email_url').'/'.$notifiable->confirmation_code); |
|
| 46 | - } |
|
| 33 | + /** |
|
| 34 | + * Get the mail representation of the notification. |
|
| 35 | + * |
|
| 36 | + * @param mixed $notifiable |
|
| 37 | + * @return \Illuminate\Notifications\Messages\MailMessage |
|
| 38 | + */ |
|
| 39 | + public function toMail($notifiable) |
|
| 40 | + { |
|
| 41 | + return (new MailMessage) |
|
| 42 | + ->subject('Email verification') |
|
| 43 | + ->line('Email verification') |
|
| 44 | + ->line('To validate your email click on the button below') |
|
| 45 | + ->action('Verify your email', config('skeleton.confrim_email_url').'/'.$notifiable->confirmation_code); |
|
| 46 | + } |
|
| 47 | 47 | } |
@@ -9,41 +9,41 @@ |
||
| 9 | 9 | |
| 10 | 10 | class ResetPassword extends Notification implements ShouldQueue |
| 11 | 11 | { |
| 12 | - use Queueable; |
|
| 12 | + use Queueable; |
|
| 13 | 13 | |
| 14 | - protected $token; |
|
| 14 | + protected $token; |
|
| 15 | 15 | |
| 16 | - /** |
|
| 17 | - * Create a new notification instance. |
|
| 18 | - */ |
|
| 19 | - public function __construct($token) |
|
| 20 | - { |
|
| 21 | - $this->token = $token; |
|
| 22 | - } |
|
| 16 | + /** |
|
| 17 | + * Create a new notification instance. |
|
| 18 | + */ |
|
| 19 | + public function __construct($token) |
|
| 20 | + { |
|
| 21 | + $this->token = $token; |
|
| 22 | + } |
|
| 23 | 23 | |
| 24 | - /** |
|
| 25 | - * Get the notification's delivery channels. |
|
| 26 | - * |
|
| 27 | - * @param mixed $notifiable |
|
| 28 | - * @return string[] |
|
| 29 | - */ |
|
| 30 | - public function via($notifiable) |
|
| 31 | - { |
|
| 32 | - return ['mail']; |
|
| 33 | - } |
|
| 24 | + /** |
|
| 25 | + * Get the notification's delivery channels. |
|
| 26 | + * |
|
| 27 | + * @param mixed $notifiable |
|
| 28 | + * @return string[] |
|
| 29 | + */ |
|
| 30 | + public function via($notifiable) |
|
| 31 | + { |
|
| 32 | + return ['mail']; |
|
| 33 | + } |
|
| 34 | 34 | |
| 35 | - /** |
|
| 36 | - * Get the mail representation of the notification. |
|
| 37 | - * |
|
| 38 | - * @param mixed $notifiable |
|
| 39 | - * @return \Illuminate\Notifications\Messages\MailMessage |
|
| 40 | - */ |
|
| 41 | - public function toMail($notifiable) |
|
| 42 | - { |
|
| 43 | - return (new MailMessage) |
|
| 44 | - ->subject('Reset passowrd') |
|
| 45 | - ->line('Reset passowrd') |
|
| 46 | - ->line('To reset your password click on the button below') |
|
| 47 | - ->action('Reset password', config('skeleton.reset_password_url').'/'.$this->token); |
|
| 48 | - } |
|
| 35 | + /** |
|
| 36 | + * Get the mail representation of the notification. |
|
| 37 | + * |
|
| 38 | + * @param mixed $notifiable |
|
| 39 | + * @return \Illuminate\Notifications\Messages\MailMessage |
|
| 40 | + */ |
|
| 41 | + public function toMail($notifiable) |
|
| 42 | + { |
|
| 43 | + return (new MailMessage) |
|
| 44 | + ->subject('Reset passowrd') |
|
| 45 | + ->line('Reset passowrd') |
|
| 46 | + ->line('To reset your password click on the button below') |
|
| 47 | + ->action('Reset password', config('skeleton.reset_password_url').'/'.$this->token); |
|
| 48 | + } |
|
| 49 | 49 | } |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | return [ |
| 4 | 4 | |
| 5 | - /** |
|
| 6 | - * Here goes your notification messages. |
|
| 7 | - */ |
|
| 5 | + /** |
|
| 6 | + * Here goes your notification messages. |
|
| 7 | + */ |
|
| 8 | 8 | |
| 9 | 9 | ]; |