@@ -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\Acl\AclUser','users_groups','group_id','user_id')->whereNull('users_groups.deleted_at')->withTimestamps(); |
|
32 | + return $this->belongsToMany('\App\Modules\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\Acl\AclPermission','groups_permissions','group_id','permission_id')->whereNull('groups_permissions.deleted_at')->withTimestamps(); |
|
37 | + return $this->belongsToMany('\App\Modules\Acl\AclPermission', 'groups_permissions', 'group_id', 'permission_id')->whereNull('groups_permissions.deleted_at')->withTimestamps(); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | public static function boot() |
@@ -13,14 +13,14 @@ |
||
13 | 13 | * to preform actions like (add, edit ... etc). |
14 | 14 | * @var string |
15 | 15 | */ |
16 | - protected $model = 'groups'; |
|
16 | + protected $model = 'groups'; |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * The validations rules used by the base api controller |
20 | 20 | * to check before add. |
21 | 21 | * @var array |
22 | 22 | */ |
23 | - protected $validationRules = [ |
|
23 | + protected $validationRules = [ |
|
24 | 24 | 'name' => 'required|string|max:100|unique:groups,name,{id}' |
25 | 25 | ]; |
26 | 26 |
@@ -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'); |
@@ -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'); |
@@ -29,7 +29,7 @@ |
||
29 | 29 | |
30 | 30 | public function groups() |
31 | 31 | { |
32 | - return $this->belongsToMany('\App\Modules\Acl\AclGroup','groups_permissions','permission_id','group_id')->whereNull('groups_permissions.deleted_at')->withTimestamps(); |
|
32 | + return $this->belongsToMany('\App\Modules\Acl\AclGroup', 'groups_permissions', 'permission_id', 'group_id')->whereNull('groups_permissions.deleted_at')->withTimestamps(); |
|
33 | 33 | } |
34 | 34 | |
35 | 35 | public static function boot() |
@@ -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 | }); |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | use App\User; |
4 | 4 | use Illuminate\Database\Eloquent\SoftDeletes; |
5 | -use Illuminate\Notifications\Notifiable; |
|
6 | 5 | use Laravel\Passport\HasApiTokens; |
7 | 6 | |
8 | 7 | class AclUser extends User { |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | use SoftDeletes, HasApiTokens; |
11 | 11 | protected $table = 'users'; |
12 | 12 | protected $dates = ['created_at', 'updated_at', 'deleted_at']; |
13 | - protected $hidden = ['password', 'remember_token','deleted_at']; |
|
13 | + protected $hidden = ['password', 'remember_token', 'deleted_at']; |
|
14 | 14 | protected $guarded = ['id']; |
15 | 15 | protected $fillable = ['profile_picture', 'name', 'email', 'password']; |
16 | 16 | public $searchable = ['name', 'email']; |
@@ -67,7 +67,7 @@ discard block |
||
67 | 67 | |
68 | 68 | public function groups() |
69 | 69 | { |
70 | - return $this->belongsToMany('\App\Modules\Acl\AclGroup','users_groups','user_id','group_id')->whereNull('users_groups.deleted_at')->withTimestamps(); |
|
70 | + return $this->belongsToMany('\App\Modules\Acl\AclGroup', 'users_groups', 'user_id', 'group_id')->whereNull('users_groups.deleted_at')->withTimestamps(); |
|
71 | 71 | } |
72 | 72 | |
73 | 73 | public function oauthClients() |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | */ |
115 | 115 | public function receivesBroadcastNotificationsOn() |
116 | 116 | { |
117 | - return 'users.' . $this->id; |
|
117 | + return 'users.'.$this->id; |
|
118 | 118 | } |
119 | 119 | |
120 | 120 | public static function boot() |
@@ -2,7 +2,6 @@ |
||
2 | 2 | namespace App\Modules\Core\Http\Controllers; |
3 | 3 | |
4 | 4 | use App\Http\Controllers\Controller; |
5 | -use Illuminate\Http\Request; |
|
6 | 5 | |
7 | 6 | class ApiDocumentController extends Controller |
8 | 7 | { |
@@ -20,27 +20,27 @@ discard block |
||
20 | 20 | ], |
21 | 21 | [ |
22 | 22 | 'title' => 'email equal [email protected] and user is blocked:', |
23 | - 'content' => ['and' => ['email' => '[email protected]','blocked' => 1]] |
|
23 | + 'content' => ['and' => ['email' => '[email protected]', 'blocked' => 1]] |
|
24 | 24 | ], |
25 | 25 | [ |
26 | 26 | 'title' => 'email equal [email protected] or user is blocked:', |
27 | - 'content' => ['or' => ['email' => '[email protected]','blocked' => 1]] |
|
27 | + 'content' => ['or' => ['email' => '[email protected]', 'blocked' => 1]] |
|
28 | 28 | ], |
29 | 29 | [ |
30 | 30 | 'title' => 'email contain John:', |
31 | - 'content' => ['email' => ['op' => 'like','val' => '%John%']] |
|
31 | + 'content' => ['email' => ['op' => 'like', 'val' => '%John%']] |
|
32 | 32 | ], |
33 | 33 | [ |
34 | 34 | 'title' => 'user created after 2016-10-25:', |
35 | - 'content' => ['created_at' => ['op' => '>','val' => '2016-10-25']] |
|
35 | + 'content' => ['created_at' => ['op' => '>', 'val' => '2016-10-25']] |
|
36 | 36 | ], |
37 | 37 | [ |
38 | 38 | 'title' => 'user created between 2016-10-20 and 2016-10-25:', |
39 | - 'content' => ['created_at' => ['op' => 'between','val1' => '2016-10-20','val2' => '2016-10-25']] |
|
39 | + 'content' => ['created_at' => ['op' => 'between', 'val1' => '2016-10-20', 'val2' => '2016-10-25']] |
|
40 | 40 | ], |
41 | 41 | [ |
42 | 42 | 'title' => 'user id in 1,2,3:', |
43 | - 'content' => ['id' => ['op' => 'in','val' => [1, 2, 3]]] |
|
43 | + 'content' => ['id' => ['op' => 'in', 'val' => [1, 2, 3]]] |
|
44 | 44 | ], |
45 | 45 | [ |
46 | 46 | 'title' => 'user name is null:', |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | ], |
53 | 53 | [ |
54 | 54 | 'title' => 'user has group admin:', |
55 | - 'content' => ['groups' => ['op' => 'has','val' => ['name' => 'Admin']]] |
|
55 | + 'content' => ['groups' => ['op' => 'has', 'val' => ['name' => 'Admin']]] |
|
56 | 56 | ] |
57 | 57 | ]; |
58 | 58 |
@@ -6,7 +6,6 @@ |
||
6 | 6 | use Illuminate\Notifications\Notification; |
7 | 7 | use Illuminate\Contracts\Queue\ShouldQueue; |
8 | 8 | use Illuminate\Notifications\Messages\MailMessage; |
9 | -use Illuminate\Notifications\Messages\BroadcastMessage; |
|
10 | 9 | |
11 | 10 | class ResetPassword extends Notification implements ShouldQueue |
12 | 11 | { |
@@ -47,6 +47,6 @@ |
||
47 | 47 | ->subject('Reset passowrd') |
48 | 48 | ->line('Reset passowrd') |
49 | 49 | ->line('To reset your password click on the button below') |
50 | - ->action('Reset password', config('reset_password_url') . '/' . $this->token); |
|
50 | + ->action('Reset password', config('reset_password_url').'/'.$this->token); |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | \ No newline at end of file |