@@ -13,7 +13,7 @@ discard block |
||
| 13 | 13 | * to preform actions like (add, edit ... etc). |
| 14 | 14 | * @var string |
| 15 | 15 | */ |
| 16 | - protected $model = 'users'; |
|
| 16 | + protected $model = 'users'; |
|
| 17 | 17 | |
| 18 | 18 | /** |
| 19 | 19 | * List of all route actions that the base api controller |
@@ -27,14 +27,14 @@ discard block |
||
| 27 | 27 | * will skip login check for them. |
| 28 | 28 | * @var array |
| 29 | 29 | */ |
| 30 | - protected $skipLoginCheck = ['login', 'loginSocial', 'register', 'sendreset', 'resetpassword', 'refreshtoken', 'confirmEmail', 'resendEmailConfirmation']; |
|
| 30 | + protected $skipLoginCheck = ['login', 'loginSocial', 'register', 'sendreset', 'resetpassword', 'refreshtoken', 'confirmEmail', 'resendEmailConfirmation']; |
|
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | 33 | * The validations rules used by the base api controller |
| 34 | 34 | * to check before add. |
| 35 | 35 | * @var array |
| 36 | 36 | */ |
| 37 | - protected $validationRules = [ |
|
| 37 | + protected $validationRules = [ |
|
| 38 | 38 | 'name' => 'nullable|string', |
| 39 | 39 | 'email' => 'required|email|unique:users,email,{id}', |
| 40 | 40 | 'password' => 'nullable|min:6' |
@@ -281,7 +281,7 @@ discard block |
||
| 281 | 281 | $this->validate($request, [ |
| 282 | 282 | 'profile_picture' => 'nullable|string', |
| 283 | 283 | 'name' => 'nullable|string', |
| 284 | - 'email' => 'required|email|unique:users,email,' . \Auth::id() |
|
| 284 | + 'email' => 'required|email|unique:users,email,'.\Auth::id() |
|
| 285 | 285 | ]); |
| 286 | 286 | |
| 287 | 287 | return \Response::json($this->repo->saveProfile($request->only('name', 'email', 'profile_picture')), 200); |
@@ -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 | |
@@ -13,14 +13,14 @@ |
||
| 13 | 13 | * to preform actions like (add, edit ... etc). |
| 14 | 14 | * @var string |
| 15 | 15 | */ |
| 16 | - protected $model = 'oauthClients'; |
|
| 16 | + protected $model = 'oauthClients'; |
|
| 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|max:255', |
| 25 | 25 | 'redirect' => 'required|url', |
| 26 | 26 | 'user_id' => 'required|exists:users,id', |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$factory->define(App\Modules\Acl\AclPermission::class, function (Faker\Generator $faker) { |
|
| 3 | +$factory->define(App\Modules\Acl\AclPermission::class, function(Faker\Generator $faker) { |
|
| 4 | 4 | return [ |
| 5 | 5 | 'name' => $faker->randomElement(['save', 'delete', 'find', 'paginate']), |
| 6 | 6 | 'model' => $faker->randomElement(['users', 'groups', 'settings', 'notifications']), |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$factory->define(App\Modules\Acl\AclUser::class, function (Faker\Generator $faker) { |
|
| 3 | +$factory->define(App\Modules\Acl\AclUser::class, function(Faker\Generator $faker) { |
|
| 4 | 4 | return [ |
| 5 | 5 | 'profile_picture' => 'http://lorempixel.com/400/200/', |
| 6 | 6 | 'name' => $faker->name(), |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$factory->define(App\Modules\Acl\OauthClient::class, function (Faker\Generator $faker) { |
|
| 3 | +$factory->define(App\Modules\Acl\OauthClient::class, function(Faker\Generator $faker) { |
|
| 4 | 4 | return [ |
| 5 | 5 | 'user_id' => $faker->randomDigit(), |
| 6 | 6 | 'name' => $faker->name(), |
@@ -1,6 +1,6 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | |
| 3 | -$factory->define(App\Modules\Acl\AclGroup::class, function (Faker\Generator $faker) { |
|
| 3 | +$factory->define(App\Modules\Acl\AclGroup::class, function(Faker\Generator $faker) { |
|
| 4 | 4 | return [ |
| 5 | 5 | 'name' => $faker->unique->word(), |
| 6 | 6 | 'created_at' => $faker->dateTimeBetween('-1 years', 'now'), |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | /** |
| 19 | 19 | * Assign the permissions to the admin group. |
| 20 | 20 | */ |
| 21 | - \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['users', 'permissions', 'groups', 'oauthClients'])->each(function ($permission) use ($adminGroupId) { |
|
| 21 | + \DB::table('permissions')->orderBy('created_at', 'asc')->whereIn('model', ['users', 'permissions', 'groups', 'oauthClients'])->each(function($permission) use ($adminGroupId) { |
|
| 22 | 22 | \DB::table('groups_permissions')->insert( |
| 23 | 23 | [ |
| 24 | 24 | 'permission_id' => $permission->id, |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('password_resets', function (Blueprint $table) { |
|
| 15 | + Schema::create('password_resets', function(Blueprint $table) { |
|
| 16 | 16 | $table->string('email')->index(); |
| 17 | 17 | $table->string('token')->index(); |
| 18 | 18 | $table->timestamp('created_at'); |