@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | use Faker\Generator as Faker; |
| 3 | 3 | |
| 4 | -$factory->define(agoalofalife\postman\Models\Status::class, function (Faker $faker) { |
|
| 4 | +$factory->define(agoalofalife\postman\Models\Status::class, function(Faker $faker) { |
|
| 5 | 5 | return [ |
| 6 | 6 | 'name' => $faker->word, |
| 7 | 7 | 'description' => $faker->text, |
@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | use Faker\Generator as Faker; |
| 3 | 3 | |
| 4 | -$factory->define(agoalofalife\postman\Models\SheduleEmail::class, function (Faker $faker) { |
|
| 4 | +$factory->define(agoalofalife\postman\Models\SheduleEmail::class, function(Faker $faker) { |
|
| 5 | 5 | return [ |
| 6 | 6 | 'date' => $faker->date('Y-m-d'), |
| 7 | 7 | 'email_id' => factory(agoalofalife\postman\Models\Email::class)->create()->id, |
@@ -17,10 +17,10 @@ |
||
| 17 | 17 | { |
| 18 | 18 | foreach (trans('postman::statuses') as $status) { |
| 19 | 19 | Status::firstOrCreate([ |
| 20 | - 'name' => $status['name'], |
|
| 21 | - 'description' => $status['description'], |
|
| 22 | - 'color_rgb' => $status['color_rgb'], |
|
| 23 | - Status::COLUMN_UNIQUE_NAME => $status['unique_name'], |
|
| 20 | + 'name' => $status[ 'name' ], |
|
| 21 | + 'description' => $status[ 'description' ], |
|
| 22 | + 'color_rgb' => $status[ 'color_rgb' ], |
|
| 23 | + Status::COLUMN_UNIQUE_NAME => $status[ 'unique_name' ], |
|
| 24 | 24 | ]); |
| 25 | 25 | } |
| 26 | 26 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | { |
| 15 | 15 | public static function parse() : void |
| 16 | 16 | { |
| 17 | - SheduleEmail::whereRaw('CAST(date AS Datetime) <= ? AND status_id = ?', [Carbon::now(), Status::inProcess()])->get() |
|
| 17 | + SheduleEmail::whereRaw('CAST(date AS Datetime) <= ? AND status_id = ?', [Carbon::now(), Status::inProcess()])->get() |
|
| 18 | 18 | ->each(function ($value) { |
| 19 | 19 | $value->mode->owner->postEmail($value); |
| 20 | 20 | }); |
@@ -14,8 +14,8 @@ |
||
| 14 | 14 | { |
| 15 | 15 | public static function parse() : void |
| 16 | 16 | { |
| 17 | - SheduleEmail::whereRaw('CAST(date AS Datetime) <= ? AND status_id = ?', [Carbon::now(), Status::inProcess()])->get() |
|
| 18 | - ->each(function ($value) { |
|
| 17 | + SheduleEmail::whereRaw('CAST(date AS Datetime) <= ? AND status_id = ?', [ Carbon::now(), Status::inProcess() ])->get() |
|
| 18 | + ->each(function($value) { |
|
| 19 | 19 | $value->mode->owner->postEmail($value); |
| 20 | 20 | }); |
| 21 | 21 | } |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | const DONE = 'done'; |
| 11 | 11 | const COLUMN_UNIQUE_NAME = 'unique_name'; |
| 12 | 12 | |
| 13 | - protected $fillable = ['name', 'description', 'color_rgb', self::COLUMN_UNIQUE_NAME]; |
|
| 13 | + protected $fillable = [ 'name', 'description', 'color_rgb', self::COLUMN_UNIQUE_NAME ]; |
|
| 14 | 14 | |
| 15 | 15 | /** |
| 16 | 16 | * Get id status "In process" |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | use agoalofalife\postman\Models\Status; |
| 3 | 3 | |
| 4 | 4 | return [ |
| 5 | - [ |
|
| 6 | - 'name' => 'In process', |
|
| 7 | - 'description' => 'This task is in the process', |
|
| 8 | - 'color_rgb' => '#c9e5f5', |
|
| 9 | - Status::COLUMN_UNIQUE_NAME => Status::IN_PROCESS, |
|
| 10 | - ], |
|
| 5 | + [ |
|
| 6 | + 'name' => 'In process', |
|
| 7 | + 'description' => 'This task is in the process', |
|
| 8 | + 'color_rgb' => '#c9e5f5', |
|
| 9 | + Status::COLUMN_UNIQUE_NAME => Status::IN_PROCESS, |
|
| 10 | + ], |
|
| 11 | 11 | [ |
| 12 | 12 | 'name' => 'Done', |
| 13 | 13 | 'description' => 'It is the task finished', |
@@ -2,12 +2,12 @@ |
||
| 2 | 2 | use agoalofalife\postman\Models\Status; |
| 3 | 3 | |
| 4 | 4 | return [ |
| 5 | - [ |
|
| 6 | - 'name' => 'В процессе', |
|
| 7 | - 'description' => 'Это задача находится в процессе', |
|
| 8 | - 'color_rgb' => '#c9e5f5', |
|
| 9 | - Status::COLUMN_UNIQUE_NAME => Status::IN_PROCESS, |
|
| 10 | - ], |
|
| 5 | + [ |
|
| 6 | + 'name' => 'В процессе', |
|
| 7 | + 'description' => 'Это задача находится в процессе', |
|
| 8 | + 'color_rgb' => '#c9e5f5', |
|
| 9 | + Status::COLUMN_UNIQUE_NAME => Status::IN_PROCESS, |
|
| 10 | + ], |
|
| 11 | 11 | [ |
| 12 | 12 | 'name' => 'Выполнена', |
| 13 | 13 | 'description' => 'Эта задача закончена.', |