@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use Illuminate\Database\Eloquent\Model; |
| 4 | 4 | use Illuminate\Database\Eloquent\SoftDeletes; |
| 5 | 5 | |
| 6 | -class Notification extends Model{ |
|
| 6 | +class Notification extends Model { |
|
| 7 | 7 | |
| 8 | 8 | use SoftDeletes; |
| 9 | 9 | protected $table = 'notifications'; |
@@ -12,14 +12,14 @@ |
||
| 12 | 12 | * to preform actions like (add, edit ... etc). |
| 13 | 13 | * @var string |
| 14 | 14 | */ |
| 15 | - protected $model = 'notifications'; |
|
| 15 | + protected $model = 'notifications'; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * The validations rules used by the base api controller |
| 19 | 19 | * to check before add. |
| 20 | 20 | * @var array |
| 21 | 21 | */ |
| 22 | - protected $validationRules = [ |
|
| 22 | + protected $validationRules = [ |
|
| 23 | 23 | 'device_token' => 'required|string|max:100', |
| 24 | 24 | 'device_type' => 'required|in:androind,ios', |
| 25 | 25 | 'user_id' => 'required|exists:users,id', |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('push_notifications_devices', function (Blueprint $table) { |
|
| 15 | + Schema::create('push_notifications_devices', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | - $table->string('device_token',100); |
|
| 17 | + $table->string('device_token', 100); |
|
| 18 | 18 | $table->enum('device_type', ['android', 'ios']); |
| 19 | 19 | $table->integer('user_id'); |
| 20 | 20 | $table->boolean('active')->default(1); |