@@ -3,7 +3,7 @@ |
||
3 | 3 | use Illuminate\Database\Eloquent\Model; |
4 | 4 | use Illuminate\Database\Eloquent\SoftDeletes; |
5 | 5 | |
6 | -class Log extends Model{ |
|
6 | +class Log extends Model { |
|
7 | 7 | |
8 | 8 | use SoftDeletes; |
9 | 9 | protected $table = 'logs'; |
@@ -12,11 +12,11 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('logs', function (Blueprint $table) { |
|
15 | + Schema::create('logs', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | - $table->string('action',100); |
|
18 | - $table->string('item_name',100); |
|
19 | - $table->string('item_type',100); |
|
17 | + $table->string('action', 100); |
|
18 | + $table->string('item_name', 100); |
|
19 | + $table->string('item_type', 100); |
|
20 | 20 | $table->integer('item_id'); |
21 | 21 | $table->integer('user_id'); |
22 | 22 | $table->softDeletes(); |
@@ -12,5 +12,5 @@ |
||
12 | 12 | * to preform actions like (add, edit ... etc). |
13 | 13 | * @var string |
14 | 14 | */ |
15 | - protected $model = 'logs'; |
|
15 | + protected $model = 'logs'; |
|
16 | 16 | } |
@@ -12,10 +12,10 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('reports', function (Blueprint $table) { |
|
15 | + Schema::create('reports', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | - $table->string('report_name',100); |
|
18 | - $table->string('view_name',100); |
|
17 | + $table->string('report_name', 100); |
|
18 | + $table->string('view_name', 100); |
|
19 | 19 | $table->softDeletes(); |
20 | 20 | $table->timestamps(); |
21 | 21 | }); |
@@ -12,7 +12,7 @@ |
||
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 | * Set the notification notified to true. |
@@ -3,7 +3,7 @@ discard block |
||
3 | 3 | use Illuminate\Database\Eloquent\Model; |
4 | 4 | use Illuminate\Database\Eloquent\SoftDeletes; |
5 | 5 | |
6 | -class AclGroup extends Model{ |
|
6 | +class AclGroup extends Model { |
|
7 | 7 | |
8 | 8 | use SoftDeletes; |
9 | 9 | protected $table = 'groups'; |
@@ -29,12 +29,12 @@ discard block |
||
29 | 29 | |
30 | 30 | public function users() |
31 | 31 | { |
32 | - return $this->belongsToMany('\App\Modules\V1\Acl\AclUser','users_groups','group_id','user_id')->whereNull('users_groups.deleted_at')->withTimestamps(); |
|
32 | + return $this->belongsToMany('\App\Modules\V1\Acl\AclUser', 'users_groups', 'group_id', 'user_id')->whereNull('users_groups.deleted_at')->withTimestamps(); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public function permissions() |
36 | 36 | { |
37 | - return $this->belongsToMany('\App\Modules\V1\Acl\AclPermission','groups_permissions','group_id','permission_id')->whereNull('groups_permissions.deleted_at')->withTimestamps(); |
|
37 | + return $this->belongsToMany('\App\Modules\V1\Acl\AclPermission', 'groups_permissions', 'group_id', 'permission_id')->whereNull('groups_permissions.deleted_at')->withTimestamps(); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public static function boot() |
@@ -12,14 +12,14 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('groups', function (Blueprint $table) { |
|
15 | + Schema::create('groups', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | - $table->string('name',100)->unique(); |
|
17 | + $table->string('name', 100)->unique(); |
|
18 | 18 | $table->softDeletes(); |
19 | 19 | $table->timestamps(); |
20 | 20 | }); |
21 | 21 | |
22 | - Schema::create('users_groups', function (Blueprint $table) { |
|
22 | + Schema::create('users_groups', function(Blueprint $table) { |
|
23 | 23 | $table->increments('id'); |
24 | 24 | $table->integer('user_id'); |
25 | 25 | $table->integer('group_id'); |
@@ -12,15 +12,15 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('permissions', function (Blueprint $table) { |
|
15 | + Schema::create('permissions', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | - $table->string('name',100); |
|
18 | - $table->string('model',100); |
|
17 | + $table->string('name', 100); |
|
18 | + $table->string('model', 100); |
|
19 | 19 | $table->softDeletes(); |
20 | 20 | $table->timestamps(); |
21 | 21 | $table->unique(array('name', 'model')); |
22 | 22 | }); |
23 | - Schema::create('groups_permissions', function (Blueprint $table) { |
|
23 | + Schema::create('groups_permissions', function(Blueprint $table) { |
|
24 | 24 | $table->increments('id'); |
25 | 25 | $table->integer('group_id'); |
26 | 26 | $table->integer('permission_id'); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | public function groups() |
31 | 31 | { |
32 | - return $this->belongsToMany('\App\Modules\V1\Acl\AclGroup','groups_permissions','permission_id','group_id')->whereNull('groups_permissions.deleted_at')->withTimestamps(); |
|
32 | + return $this->belongsToMany('\App\Modules\V1\Acl\AclGroup', 'groups_permissions', 'permission_id', 'group_id')->whereNull('groups_permissions.deleted_at')->withTimestamps(); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public static function boot() |