@@ -23,7 +23,9 @@ discard block |
||
| 23 | 23 | } |
| 24 | 24 | |
| 25 | 25 | private static function cacheUserVariables() { |
| 26 | - if(isset(self::$userVariables)) return; |
|
| 26 | + if(isset(self::$userVariables)) { |
|
| 27 | + return; |
|
| 28 | + } |
|
| 27 | 29 | |
| 28 | 30 | $userId = Auth::user()->id; |
| 29 | 31 | |
@@ -33,7 +35,9 @@ discard block |
||
| 33 | 35 | } |
| 34 | 36 | |
| 35 | 37 | private static function cacheAdminVariables() { |
| 36 | - if(isset(self::$adminVariables)) return; |
|
| 38 | + if(isset(self::$adminVariables)) { |
|
| 39 | + return; |
|
| 40 | + } |
|
| 37 | 41 | |
| 38 | 42 | foreach (self::where('user_id', 0) as $row) { |
| 39 | 43 | self::$adminVariables[$row['group']][$row['name']] = $row['value']; |
@@ -43,7 +47,9 @@ discard block |
||
| 43 | 47 | public static function get($group, $name, $user = null) { |
| 44 | 48 | $user = $user?: Auth::user()->id; |
| 45 | 49 | |
| 46 | - if (!$user || !is_numeric($user)) return; |
|
| 50 | + if (!$user || !is_numeric($user)) { |
|
| 51 | + return; |
|
| 52 | + } |
|
| 47 | 53 | |
| 48 | 54 | self::cache(); |
| 49 | 55 | |
@@ -53,7 +59,9 @@ discard block |
||
| 53 | 59 | public static function getGroup($group, $user = null) { |
| 54 | 60 | $user = $user?: Auth::user()->id; |
| 55 | 61 | |
| 56 | - if (!$user || !is_numeric($user)) return; |
|
| 62 | + if (!$user || !is_numeric($user)) { |
|
| 63 | + return; |
|
| 64 | + } |
|
| 57 | 65 | |
| 58 | 66 | self::cache(); |
| 59 | 67 | |
@@ -75,7 +83,9 @@ discard block |
||
| 75 | 83 | public static function put($group, $name, $value, $user = null) { |
| 76 | 84 | $user_id = $user?: Auth::user()->id; |
| 77 | 85 | |
| 78 | - if (!$user_id || !is_numeric($user_id)) return; |
|
| 86 | + if (!$user_id || !is_numeric($user_id)) { |
|
| 87 | + return; |
|
| 88 | + } |
|
| 79 | 89 | |
| 80 | 90 | self::cache(); |
| 81 | 91 | |
@@ -103,7 +113,9 @@ discard block |
||
| 103 | 113 | public static function forget($group, $name, $user = null) { |
| 104 | 114 | $user_id = $user?: Auth::user()->id; |
| 105 | 115 | |
| 106 | - if (!$user_id || !is_numeric($user_id)) return; |
|
| 116 | + if (!$user_id || !is_numeric($user_id)) { |
|
| 117 | + return; |
|
| 118 | + } |
|
| 107 | 119 | |
| 108 | 120 | self::cache(); |
| 109 | 121 | |
@@ -6,31 +6,31 @@ |
||
| 6 | 6 | |
| 7 | 7 | class CreateUserSettingsTable extends Migration |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the migrations. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function up() |
|
| 15 | - { |
|
| 16 | - $this->down(); |
|
| 9 | + /** |
|
| 10 | + * Run the migrations. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function up() |
|
| 15 | + { |
|
| 16 | + $this->down(); |
|
| 17 | 17 | |
| 18 | - Schema::create('user_settings', function (Blueprint $table) { |
|
| 19 | - $table->increments('id'); |
|
| 20 | - $table->unsignedInteger('user_id'); |
|
| 21 | - $table->string('group', 512); |
|
| 22 | - $table->string('name', 128); |
|
| 23 | - $table->text('value'); |
|
| 24 | - }); |
|
| 25 | - } |
|
| 18 | + Schema::create('user_settings', function (Blueprint $table) { |
|
| 19 | + $table->increments('id'); |
|
| 20 | + $table->unsignedInteger('user_id'); |
|
| 21 | + $table->string('group', 512); |
|
| 22 | + $table->string('name', 128); |
|
| 23 | + $table->text('value'); |
|
| 24 | + }); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Reverse the migrations. |
|
| 29 | - * |
|
| 30 | - * @return void |
|
| 31 | - */ |
|
| 32 | - public function down() |
|
| 33 | - { |
|
| 34 | - Schema::dropIfExists('user_settings'); |
|
| 35 | - } |
|
| 27 | + /** |
|
| 28 | + * Reverse the migrations. |
|
| 29 | + * |
|
| 30 | + * @return void |
|
| 31 | + */ |
|
| 32 | + public function down() |
|
| 33 | + { |
|
| 34 | + Schema::dropIfExists('user_settings'); |
|
| 35 | + } |
|
| 36 | 36 | } |
@@ -6,42 +6,42 @@ |
||
| 6 | 6 | |
| 7 | 7 | class CreateDashboardTables extends Migration |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the migrations. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function up() |
|
| 15 | - { |
|
| 16 | - $this->down(); |
|
| 9 | + /** |
|
| 10 | + * Run the migrations. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function up() |
|
| 15 | + { |
|
| 16 | + $this->down(); |
|
| 17 | 17 | |
| 18 | - Schema::create('dashboards', function (Blueprint $table) { |
|
| 19 | - $table->increments('id'); |
|
| 20 | - $table->unsignedInteger('user_id'); |
|
| 21 | - $table->string('name', 64); |
|
| 22 | - $table->smallInteger('position'); |
|
| 23 | - }); |
|
| 18 | + Schema::create('dashboards', function (Blueprint $table) { |
|
| 19 | + $table->increments('id'); |
|
| 20 | + $table->unsignedInteger('user_id'); |
|
| 21 | + $table->string('name', 64); |
|
| 22 | + $table->smallInteger('position'); |
|
| 23 | + }); |
|
| 24 | 24 | |
| 25 | - Schema::create('dashboard_applets', function (Blueprint $table) { |
|
| 26 | - $table->increments('id'); |
|
| 27 | - $table->unsignedInteger('dashboard_id'); |
|
| 28 | - $table->string('class', 512); |
|
| 29 | - $table->smallInteger('column'); |
|
| 30 | - $table->smallInteger('row'); |
|
| 31 | - $table->text('options'); |
|
| 25 | + Schema::create('dashboard_applets', function (Blueprint $table) { |
|
| 26 | + $table->increments('id'); |
|
| 27 | + $table->unsignedInteger('dashboard_id'); |
|
| 28 | + $table->string('class', 512); |
|
| 29 | + $table->smallInteger('column'); |
|
| 30 | + $table->smallInteger('row'); |
|
| 31 | + $table->text('options'); |
|
| 32 | 32 | |
| 33 | - $table->foreign('dashboard_id')->references('id')->on('dashboards'); |
|
| 34 | - }); |
|
| 35 | - } |
|
| 33 | + $table->foreign('dashboard_id')->references('id')->on('dashboards'); |
|
| 34 | + }); |
|
| 35 | + } |
|
| 36 | 36 | |
| 37 | - /** |
|
| 38 | - * Reverse the migrations. |
|
| 39 | - * |
|
| 40 | - * @return void |
|
| 41 | - */ |
|
| 42 | - public function down() |
|
| 43 | - { |
|
| 44 | - Schema::dropIfExists('dashboard_applets'); |
|
| 45 | - Schema::dropIfExists('dashboards'); |
|
| 46 | - } |
|
| 37 | + /** |
|
| 38 | + * Reverse the migrations. |
|
| 39 | + * |
|
| 40 | + * @return void |
|
| 41 | + */ |
|
| 42 | + public function down() |
|
| 43 | + { |
|
| 44 | + Schema::dropIfExists('dashboard_applets'); |
|
| 45 | + Schema::dropIfExists('dashboards'); |
|
| 46 | + } |
|
| 47 | 47 | } |
@@ -142,7 +142,9 @@ discard block |
||
| 142 | 142 | |
| 143 | 143 | public function addMenu() |
| 144 | 144 | { |
| 145 | - if ($this->isLocked()) return; |
|
| 145 | + if ($this->isLocked()) { |
|
| 146 | + return; |
|
| 147 | + } |
|
| 146 | 148 | |
| 147 | 149 | $dashboardId = $this->dashboard()->id; |
| 148 | 150 | |
@@ -165,14 +167,18 @@ discard block |
||
| 165 | 167 | $dashboardMenu->addItem([__('Rename dashboard'), 'icon' => 'i cursor'])->on('click', $modal->show()); |
| 166 | 168 | |
| 167 | 169 | // there is only one admin default dashboard |
| 168 | - if ($this->admin) return; |
|
| 170 | + if ($this->admin) { |
|
| 171 | + return; |
|
| 172 | + } |
|
| 169 | 173 | |
| 170 | 174 | // ***** add ***** // |
| 171 | 175 | $modal = $this->add(['Modal', 'title' => __('Add Dashboard')])->set(\Closure::fromCallable([$this, 'addDashboard'])); |
| 172 | 176 | |
| 173 | 177 | $dashboardMenu->addItem([__('Add dashboard'), 'icon' => 'add'])->on('click', $modal->show()); |
| 174 | 178 | |
| 175 | - if ($this->isSingleDashboard()) return; |
|
| 179 | + if ($this->isSingleDashboard()) { |
|
| 180 | + return; |
|
| 181 | + } |
|
| 176 | 182 | |
| 177 | 183 | // ***** reorder ***** // |
| 178 | 184 | $modal = $this->add(['Modal', 'title' => __('Reorder Dashboards')])->set(\Closure::fromCallable([$this, 'reorderDashboards'])); |
@@ -8,33 +8,33 @@ |
||
| 8 | 8 | |
| 9 | 9 | class User extends Authenticatable |
| 10 | 10 | { |
| 11 | - use Notifiable; |
|
| 12 | - use HasRoles; |
|
| 11 | + use Notifiable; |
|
| 12 | + use HasRoles; |
|
| 13 | 13 | |
| 14 | - /** |
|
| 15 | - * The attributes that are mass assignable. |
|
| 16 | - * |
|
| 17 | - * @var array |
|
| 18 | - */ |
|
| 19 | - protected $fillable = [ |
|
| 20 | - 'name', 'email', 'password', |
|
| 21 | - ]; |
|
| 14 | + /** |
|
| 15 | + * The attributes that are mass assignable. |
|
| 16 | + * |
|
| 17 | + * @var array |
|
| 18 | + */ |
|
| 19 | + protected $fillable = [ |
|
| 20 | + 'name', 'email', 'password', |
|
| 21 | + ]; |
|
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * The attributes that should be hidden for arrays. |
|
| 25 | - * |
|
| 26 | - * @var array |
|
| 27 | - */ |
|
| 28 | - protected $hidden = [ |
|
| 29 | - 'password', 'remember_token', |
|
| 30 | - ]; |
|
| 23 | + /** |
|
| 24 | + * The attributes that should be hidden for arrays. |
|
| 25 | + * |
|
| 26 | + * @var array |
|
| 27 | + */ |
|
| 28 | + protected $hidden = [ |
|
| 29 | + 'password', 'remember_token', |
|
| 30 | + ]; |
|
| 31 | 31 | |
| 32 | - /** |
|
| 33 | - * The attributes that should be cast to native types. |
|
| 34 | - * |
|
| 35 | - * @var array |
|
| 36 | - */ |
|
| 37 | - protected $casts = [ |
|
| 38 | - 'email_verified_at' => 'datetime', |
|
| 39 | - ]; |
|
| 32 | + /** |
|
| 33 | + * The attributes that should be cast to native types. |
|
| 34 | + * |
|
| 35 | + * @var array |
|
| 36 | + */ |
|
| 37 | + protected $casts = [ |
|
| 38 | + 'email_verified_at' => 'datetime', |
|
| 39 | + ]; |
|
| 40 | 40 | } |
@@ -26,8 +26,7 @@ |
||
| 26 | 26 | |
| 27 | 27 | if ($this->admin) { |
| 28 | 28 | $this->set($joint->info())->setAttr('searchkey', strtolower($joint->caption() . ';' . $joint->info())); |
| 29 | - } |
|
| 30 | - else { |
|
| 29 | + } else { |
|
| 31 | 30 | if (! $this->locked) { |
| 32 | 31 | $this->addControl('close', 'applet-close')->setAttr('title', __('Close applet')); |
| 33 | 32 | } |
@@ -6,97 +6,97 @@ |
||
| 6 | 6 | |
| 7 | 7 | class CreatePermissionTables extends Migration |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the migrations. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function up() |
|
| 15 | - { |
|
| 16 | - $tableNames = config('permission.table_names'); |
|
| 17 | - $columnNames = config('permission.column_names'); |
|
| 18 | - |
|
| 19 | - Schema::create($tableNames['permissions'], function (Blueprint $table) { |
|
| 20 | - $table->bigIncrements('id'); |
|
| 21 | - $table->string('name'); |
|
| 22 | - $table->string('guard_name'); |
|
| 23 | - $table->timestamps(); |
|
| 24 | - }); |
|
| 25 | - |
|
| 26 | - Schema::create($tableNames['roles'], function (Blueprint $table) { |
|
| 27 | - $table->bigIncrements('id'); |
|
| 28 | - $table->string('name'); |
|
| 29 | - $table->string('guard_name'); |
|
| 30 | - $table->timestamps(); |
|
| 31 | - }); |
|
| 32 | - |
|
| 33 | - Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) { |
|
| 34 | - $table->unsignedBigInteger('permission_id'); |
|
| 35 | - |
|
| 36 | - $table->string('model_type'); |
|
| 37 | - $table->unsignedBigInteger($columnNames['model_morph_key']); |
|
| 38 | - $table->index([$columnNames['model_morph_key'], 'model_type', ], 'model_has_permissions_model_id_model_type_index'); |
|
| 39 | - |
|
| 40 | - $table->foreign('permission_id') |
|
| 41 | - ->references('id') |
|
| 42 | - ->on($tableNames['permissions']) |
|
| 43 | - ->onDelete('cascade'); |
|
| 44 | - |
|
| 45 | - $table->primary(['permission_id', $columnNames['model_morph_key'], 'model_type'], |
|
| 46 | - 'model_has_permissions_permission_model_type_primary'); |
|
| 47 | - }); |
|
| 48 | - |
|
| 49 | - Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames) { |
|
| 50 | - $table->unsignedBigInteger('role_id'); |
|
| 51 | - |
|
| 52 | - $table->string('model_type'); |
|
| 53 | - $table->unsignedBigInteger($columnNames['model_morph_key']); |
|
| 54 | - $table->index([$columnNames['model_morph_key'], 'model_type', ], 'model_has_roles_model_id_model_type_index'); |
|
| 55 | - |
|
| 56 | - $table->foreign('role_id') |
|
| 57 | - ->references('id') |
|
| 58 | - ->on($tableNames['roles']) |
|
| 59 | - ->onDelete('cascade'); |
|
| 60 | - |
|
| 61 | - $table->primary(['role_id', $columnNames['model_morph_key'], 'model_type'], |
|
| 62 | - 'model_has_roles_role_model_type_primary'); |
|
| 63 | - }); |
|
| 64 | - |
|
| 65 | - Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) { |
|
| 66 | - $table->unsignedBigInteger('permission_id'); |
|
| 67 | - $table->unsignedBigInteger('role_id'); |
|
| 68 | - |
|
| 69 | - $table->foreign('permission_id') |
|
| 70 | - ->references('id') |
|
| 71 | - ->on($tableNames['permissions']) |
|
| 72 | - ->onDelete('cascade'); |
|
| 73 | - |
|
| 74 | - $table->foreign('role_id') |
|
| 75 | - ->references('id') |
|
| 76 | - ->on($tableNames['roles']) |
|
| 77 | - ->onDelete('cascade'); |
|
| 78 | - |
|
| 79 | - $table->primary(['permission_id', 'role_id'], 'role_has_permissions_permission_id_role_id_primary'); |
|
| 80 | - }); |
|
| 81 | - |
|
| 82 | - app('cache') |
|
| 83 | - ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) |
|
| 84 | - ->forget(config('permission.cache.key')); |
|
| 85 | - } |
|
| 86 | - |
|
| 87 | - /** |
|
| 88 | - * Reverse the migrations. |
|
| 89 | - * |
|
| 90 | - * @return void |
|
| 91 | - */ |
|
| 92 | - public function down() |
|
| 93 | - { |
|
| 94 | - $tableNames = config('permission.table_names'); |
|
| 95 | - |
|
| 96 | - Schema::drop($tableNames['role_has_permissions']); |
|
| 97 | - Schema::drop($tableNames['model_has_roles']); |
|
| 98 | - Schema::drop($tableNames['model_has_permissions']); |
|
| 99 | - Schema::drop($tableNames['roles']); |
|
| 100 | - Schema::drop($tableNames['permissions']); |
|
| 101 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the migrations. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function up() |
|
| 15 | + { |
|
| 16 | + $tableNames = config('permission.table_names'); |
|
| 17 | + $columnNames = config('permission.column_names'); |
|
| 18 | + |
|
| 19 | + Schema::create($tableNames['permissions'], function (Blueprint $table) { |
|
| 20 | + $table->bigIncrements('id'); |
|
| 21 | + $table->string('name'); |
|
| 22 | + $table->string('guard_name'); |
|
| 23 | + $table->timestamps(); |
|
| 24 | + }); |
|
| 25 | + |
|
| 26 | + Schema::create($tableNames['roles'], function (Blueprint $table) { |
|
| 27 | + $table->bigIncrements('id'); |
|
| 28 | + $table->string('name'); |
|
| 29 | + $table->string('guard_name'); |
|
| 30 | + $table->timestamps(); |
|
| 31 | + }); |
|
| 32 | + |
|
| 33 | + Schema::create($tableNames['model_has_permissions'], function (Blueprint $table) use ($tableNames, $columnNames) { |
|
| 34 | + $table->unsignedBigInteger('permission_id'); |
|
| 35 | + |
|
| 36 | + $table->string('model_type'); |
|
| 37 | + $table->unsignedBigInteger($columnNames['model_morph_key']); |
|
| 38 | + $table->index([$columnNames['model_morph_key'], 'model_type', ], 'model_has_permissions_model_id_model_type_index'); |
|
| 39 | + |
|
| 40 | + $table->foreign('permission_id') |
|
| 41 | + ->references('id') |
|
| 42 | + ->on($tableNames['permissions']) |
|
| 43 | + ->onDelete('cascade'); |
|
| 44 | + |
|
| 45 | + $table->primary(['permission_id', $columnNames['model_morph_key'], 'model_type'], |
|
| 46 | + 'model_has_permissions_permission_model_type_primary'); |
|
| 47 | + }); |
|
| 48 | + |
|
| 49 | + Schema::create($tableNames['model_has_roles'], function (Blueprint $table) use ($tableNames, $columnNames) { |
|
| 50 | + $table->unsignedBigInteger('role_id'); |
|
| 51 | + |
|
| 52 | + $table->string('model_type'); |
|
| 53 | + $table->unsignedBigInteger($columnNames['model_morph_key']); |
|
| 54 | + $table->index([$columnNames['model_morph_key'], 'model_type', ], 'model_has_roles_model_id_model_type_index'); |
|
| 55 | + |
|
| 56 | + $table->foreign('role_id') |
|
| 57 | + ->references('id') |
|
| 58 | + ->on($tableNames['roles']) |
|
| 59 | + ->onDelete('cascade'); |
|
| 60 | + |
|
| 61 | + $table->primary(['role_id', $columnNames['model_morph_key'], 'model_type'], |
|
| 62 | + 'model_has_roles_role_model_type_primary'); |
|
| 63 | + }); |
|
| 64 | + |
|
| 65 | + Schema::create($tableNames['role_has_permissions'], function (Blueprint $table) use ($tableNames) { |
|
| 66 | + $table->unsignedBigInteger('permission_id'); |
|
| 67 | + $table->unsignedBigInteger('role_id'); |
|
| 68 | + |
|
| 69 | + $table->foreign('permission_id') |
|
| 70 | + ->references('id') |
|
| 71 | + ->on($tableNames['permissions']) |
|
| 72 | + ->onDelete('cascade'); |
|
| 73 | + |
|
| 74 | + $table->foreign('role_id') |
|
| 75 | + ->references('id') |
|
| 76 | + ->on($tableNames['roles']) |
|
| 77 | + ->onDelete('cascade'); |
|
| 78 | + |
|
| 79 | + $table->primary(['permission_id', 'role_id'], 'role_has_permissions_permission_id_role_id_primary'); |
|
| 80 | + }); |
|
| 81 | + |
|
| 82 | + app('cache') |
|
| 83 | + ->store(config('permission.cache.store') != 'default' ? config('permission.cache.store') : null) |
|
| 84 | + ->forget(config('permission.cache.key')); |
|
| 85 | + } |
|
| 86 | + |
|
| 87 | + /** |
|
| 88 | + * Reverse the migrations. |
|
| 89 | + * |
|
| 90 | + * @return void |
|
| 91 | + */ |
|
| 92 | + public function down() |
|
| 93 | + { |
|
| 94 | + $tableNames = config('permission.table_names'); |
|
| 95 | + |
|
| 96 | + Schema::drop($tableNames['role_has_permissions']); |
|
| 97 | + Schema::drop($tableNames['model_has_roles']); |
|
| 98 | + Schema::drop($tableNames['model_has_permissions']); |
|
| 99 | + Schema::drop($tableNames['roles']); |
|
| 100 | + Schema::drop($tableNames['permissions']); |
|
| 101 | + } |
|
| 102 | 102 | } |
@@ -6,27 +6,27 @@ |
||
| 6 | 6 | |
| 7 | 7 | class CreatePasswordResetsTable extends Migration |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the migrations. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function up() |
|
| 15 | - { |
|
| 16 | - Schema::create('password_resets', function (Blueprint $table) { |
|
| 17 | - $table->string('email')->index(); |
|
| 18 | - $table->string('token'); |
|
| 19 | - $table->timestamp('created_at')->nullable(); |
|
| 20 | - }); |
|
| 21 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the migrations. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function up() |
|
| 15 | + { |
|
| 16 | + Schema::create('password_resets', function (Blueprint $table) { |
|
| 17 | + $table->string('email')->index(); |
|
| 18 | + $table->string('token'); |
|
| 19 | + $table->timestamp('created_at')->nullable(); |
|
| 20 | + }); |
|
| 21 | + } |
|
| 22 | 22 | |
| 23 | - /** |
|
| 24 | - * Reverse the migrations. |
|
| 25 | - * |
|
| 26 | - * @return void |
|
| 27 | - */ |
|
| 28 | - public function down() |
|
| 29 | - { |
|
| 30 | - Schema::dropIfExists('password_resets'); |
|
| 31 | - } |
|
| 23 | + /** |
|
| 24 | + * Reverse the migrations. |
|
| 25 | + * |
|
| 26 | + * @return void |
|
| 27 | + */ |
|
| 28 | + public function down() |
|
| 29 | + { |
|
| 30 | + Schema::dropIfExists('password_resets'); |
|
| 31 | + } |
|
| 32 | 32 | } |
@@ -6,31 +6,31 @@ |
||
| 6 | 6 | |
| 7 | 7 | class CreateUsersTable extends Migration |
| 8 | 8 | { |
| 9 | - /** |
|
| 10 | - * Run the migrations. |
|
| 11 | - * |
|
| 12 | - * @return void |
|
| 13 | - */ |
|
| 14 | - public function up() |
|
| 15 | - { |
|
| 16 | - Schema::create('users', function (Blueprint $table) { |
|
| 17 | - $table->bigIncrements('id'); |
|
| 18 | - $table->string('name'); |
|
| 19 | - $table->string('email')->unique(); |
|
| 20 | - $table->timestamp('email_verified_at')->nullable(); |
|
| 21 | - $table->string('password'); |
|
| 22 | - $table->rememberToken(); |
|
| 23 | - $table->timestamps(); |
|
| 24 | - }); |
|
| 25 | - } |
|
| 9 | + /** |
|
| 10 | + * Run the migrations. |
|
| 11 | + * |
|
| 12 | + * @return void |
|
| 13 | + */ |
|
| 14 | + public function up() |
|
| 15 | + { |
|
| 16 | + Schema::create('users', function (Blueprint $table) { |
|
| 17 | + $table->bigIncrements('id'); |
|
| 18 | + $table->string('name'); |
|
| 19 | + $table->string('email')->unique(); |
|
| 20 | + $table->timestamp('email_verified_at')->nullable(); |
|
| 21 | + $table->string('password'); |
|
| 22 | + $table->rememberToken(); |
|
| 23 | + $table->timestamps(); |
|
| 24 | + }); |
|
| 25 | + } |
|
| 26 | 26 | |
| 27 | - /** |
|
| 28 | - * Reverse the migrations. |
|
| 29 | - * |
|
| 30 | - * @return void |
|
| 31 | - */ |
|
| 32 | - public function down() |
|
| 33 | - { |
|
| 34 | - Schema::dropIfExists('users'); |
|
| 35 | - } |
|
| 27 | + /** |
|
| 28 | + * Reverse the migrations. |
|
| 29 | + * |
|
| 30 | + * @return void |
|
| 31 | + */ |
|
| 32 | + public function down() |
|
| 33 | + { |
|
| 34 | + Schema::dropIfExists('users'); |
|
| 35 | + } |
|
| 36 | 36 | } |