@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | public function creating(BaseModel $model) |
| 16 | 16 | { |
| 17 | 17 | $user = Auth::getUser(); |
| 18 | - if(!is_null($user)){ |
|
| 18 | + if(!is_null($user)) { |
|
| 19 | 19 | $model->created_by = $user->id; |
| 20 | 20 | } |
| 21 | 21 | } |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | public function updating(BaseModel $model) |
| 31 | 31 | { |
| 32 | 32 | $user = Auth::getUser(); |
| 33 | - if(!is_null($user)){ |
|
| 33 | + if(!is_null($user)) { |
|
| 34 | 34 | $model->updated_by = $user->id; |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Capsule::schema()->create('rights', function($table) |
|
| 12 | - { |
|
| 11 | + Capsule::schema()->create('rights', function($table) { |
|
| 13 | 12 | $table->increments('id'); |
| 14 | 13 | $table->string('name')->unique(); |
| 15 | 14 | $table->string('description'); |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Capsule::schema()->create('users', function($table) |
|
| 12 | - { |
|
| 11 | + Capsule::schema()->create('users', function($table) { |
|
| 13 | 12 | $table->increments('id'); |
| 14 | 13 | $table->string('email')->unique(); |
| 15 | 14 | $table->string('full_name'); |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Capsule::schema()->create('logs', function($table) |
|
| 12 | - { |
|
| 11 | + Capsule::schema()->create('logs', function($table) { |
|
| 13 | 12 | $table->increments('id'); |
| 14 | 13 | $table->string('action'); |
| 15 | 14 | $table->morphs('entity'); |
@@ -8,8 +8,7 @@ |
||
| 8 | 8 | */ |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Capsule::schema()->create('roles_to_rights', function($table) |
|
| 12 | - { |
|
| 11 | + Capsule::schema()->create('roles_to_rights', function($table) { |
|
| 13 | 12 | $table->integer('role_id')->unsigned(); |
| 14 | 13 | $table->integer('right_id')->unsigned(); |
| 15 | 14 | $table->primary(['role_id', 'right_id']); |