@@ -1,7 +1,7 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | use Faker\Generator as Faker; |
| 3 | 3 | |
| 4 | -$factory->define(agoalofalife\postman\Models\ModePostEmail::class, function (Faker $faker) { |
|
| 4 | +$factory->define(agoalofalife\postman\Models\ModePostEmail::class, function(Faker $faker) { |
|
| 5 | 5 | return [ |
| 6 | 6 | 'name' => $faker->name, |
| 7 | 7 | 'description' => $faker->text, |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -$factory->define(agoalofalife\postman\Models\User::class, function (Faker $faker) { |
|
| 16 | +$factory->define(agoalofalife\postman\Models\User::class, function(Faker $faker) { |
|
| 17 | 17 | static $password; |
| 18 | 18 | |
| 19 | 19 | return [ |
@@ -2,7 +2,7 @@ |
||
| 2 | 2 | |
| 3 | 3 | use Faker\Generator as Faker; |
| 4 | 4 | |
| 5 | -$factory->define(agoalofalife\postman\Models\Email::class, function (Faker $faker) { |
|
| 5 | +$factory->define(agoalofalife\postman\Models\Email::class, function(Faker $faker) { |
|
| 6 | 6 | return [ |
| 7 | 7 | 'theme' => $faker->text, |
| 8 | 8 | 'text' => $faker->text, |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | |
| 8 | 8 | class ModePostEmail extends Model |
| 9 | 9 | { |
| 10 | - protected $fillable = ['name', 'description', 'owner']; |
|
| 10 | + protected $fillable = [ 'name', 'description', 'owner' ]; |
|
| 11 | 11 | |
| 12 | 12 | public function getOwnerAttribute(string $value) : Mode |
| 13 | 13 | { |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | */ |
| 28 | 28 | public function handle() : void |
| 29 | 29 | { |
| 30 | - $this->call('vendor:publish', ['--tag' => 'postman-migration']); |
|
| 30 | + $this->call('vendor:publish', [ '--tag' => 'postman-migration' ]); |
|
| 31 | 31 | $this->call('migrate'); |
| 32 | 32 | $this->call('postman:seed'); |
| 33 | 33 | $this->call('postman:assets'); |
@@ -33,8 +33,8 @@ discard block |
||
| 33 | 33 | ]); |
| 34 | 34 | $this->loadViews(); |
| 35 | 35 | |
| 36 | - Request::macro('datePostman', function (Request $request) { |
|
| 37 | - $request-> date = Carbon::parse($request->date)->toDateTimeString(); |
|
| 36 | + Request::macro('datePostman', function(Request $request) { |
|
| 37 | + $request-> date = Carbon::parse($request->date)->toDateTimeString(); |
|
| 38 | 38 | }); |
| 39 | 39 | $this->mergeConfigFrom(__DIR__.'/../config/postman.php', 'postman'); |
| 40 | 40 | $this->publishesAll(); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | |
| 43 | 43 | public function register() |
| 44 | 44 | { |
| 45 | - if (! defined('POSTMAN_PATH')) { |
|
| 45 | + if (!defined('POSTMAN_PATH')) { |
|
| 46 | 46 | define('POSTMAN_PATH', realpath(__DIR__.'/../')); |
| 47 | 47 | } |
| 48 | 48 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | 'prefix' => 'postman', |
| 84 | 84 | 'namespace' => 'agoalofalife\postman\Http\Controllers', |
| 85 | 85 | 'middleware' => 'web', |
| 86 | - ], function () { |
|
| 86 | + ], function() { |
|
| 87 | 87 | $this->loadRoutesFrom(__DIR__.'/../routes/web.php'); |
| 88 | 88 | }); |
| 89 | 89 | } |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | */ |
| 17 | 17 | public function up() |
| 18 | 18 | { |
| 19 | - Schema::create('statuses', function (Blueprint $table) { |
|
| 19 | + Schema::create('statuses', function(Blueprint $table) { |
|
| 20 | 20 | $table->increments('id'); |
| 21 | 21 | $table->string('name'); |
| 22 | 22 | $table->text('description'); |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | { |
| 10 | 10 | use SoftDeletes; |
| 11 | 11 | |
| 12 | - protected $fillable = ['date' , 'email_id', 'mode_id', 'status_id']; |
|
| 12 | + protected $fillable = [ 'date', 'email_id', 'mode_id', 'status_id' ]; |
|
| 13 | 13 | |
| 14 | 14 | public function email() |
| 15 | 15 | { |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | */ |
| 21 | 21 | public function index() : Collection |
| 22 | 22 | { |
| 23 | - return SheduleEmail::with(['email.users', 'mode', 'status'])->get(); |
|
| 23 | + return SheduleEmail::with([ 'email.users', 'mode', 'status' ])->get(); |
|
| 24 | 24 | } |
| 25 | 25 | |
| 26 | 26 | /** |
@@ -54,17 +54,17 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function tableColumn() : JsonResponse |
| 56 | 56 | { |
| 57 | - $response = []; |
|
| 57 | + $response = [ ]; |
|
| 58 | 58 | |
| 59 | 59 | foreach (config('postman.ui.table') as $column => $size) { |
| 60 | - $response['columns'][] = [ |
|
| 60 | + $response[ 'columns' ][ ] = [ |
|
| 61 | 61 | 'prop' => $column, |
| 62 | 62 | 'size' => $size, |
| 63 | 63 | 'label' => trans("postman::dashboard.{$column}") |
| 64 | 64 | ]; |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - $response['button'] = [ |
|
| 67 | + $response[ 'button' ] = [ |
|
| 68 | 68 | 'edit' => trans('postman::dashboard.button.edit'), |
| 69 | 69 | 'remove' => trans('postman::dashboard.button.remove'), |
| 70 | 70 | ]; |
@@ -146,7 +146,7 @@ discard block |
||
| 146 | 146 | 'status_id' => $request->statuses |
| 147 | 147 | ]); |
| 148 | 148 | |
| 149 | - return response()->json(['status' => true]); |
|
| 149 | + return response()->json([ 'status' => true ]); |
|
| 150 | 150 | } |
| 151 | 151 | |
| 152 | 152 | /** |
@@ -175,9 +175,9 @@ discard block |
||
| 175 | 175 | $goalList->whereIn('user_id', $removal)->delete(); |
| 176 | 176 | |
| 177 | 177 | collect($request->users)->each(function($user_id) use($task, &$usersToEmail) { |
| 178 | - EmailUser::firstOrCreate(['email_id' => $task->email->id, 'user_id' => $user_id]); |
|
| 178 | + EmailUser::firstOrCreate([ 'email_id' => $task->email->id, 'user_id' => $user_id ]); |
|
| 179 | 179 | }); |
| 180 | - return response()->json(['status' => true]); |
|
| 180 | + return response()->json([ 'status' => true ]); |
|
| 181 | 181 | } |
| 182 | 182 | /** |
| 183 | 183 | * @param $id |