@@ -3,10 +3,10 @@ discard block |
||
3 | 3 | |
4 | 4 | class CoreConfig |
5 | 5 | { |
6 | - public function getConfig() |
|
7 | - { |
|
8 | - return [ |
|
9 | - 'resetLink' => '{{link_here}}', |
|
6 | + public function getConfig() |
|
7 | + { |
|
8 | + return [ |
|
9 | + 'resetLink' => '{{link_here}}', |
|
10 | 10 | /** |
11 | 11 | * Specify what relations should be used for every model. |
12 | 12 | */ |
@@ -180,5 +180,5 @@ discard block |
||
180 | 180 | ] |
181 | 181 | ] |
182 | 182 | ]; |
183 | - } |
|
183 | + } |
|
184 | 184 | } |
185 | 185 | \ No newline at end of file |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $table->unique(array('device_token', 'user_id')); |
21 | 21 | $table->softDeletes(); |
22 | 22 | $table->timestamps(); |
23 | - }); |
|
23 | + }); |
|
24 | 24 | } |
25 | 25 | |
26 | 26 | /** |
@@ -6,33 +6,33 @@ |
||
6 | 6 | |
7 | 7 | class CreateJobsTable extends Migration |
8 | 8 | { |
9 | - /** |
|
10 | - * Run the migrations. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function up() |
|
15 | - { |
|
16 | - Schema::create('jobs', function (Blueprint $table) { |
|
17 | - $table->bigIncrements('id'); |
|
18 | - $table->string('queue'); |
|
19 | - $table->longText('payload'); |
|
20 | - $table->tinyInteger('attempts')->unsigned(); |
|
21 | - $table->unsignedInteger('reserved_at')->nullable(); |
|
22 | - $table->unsignedInteger('available_at'); |
|
23 | - $table->unsignedInteger('created_at'); |
|
9 | + /** |
|
10 | + * Run the migrations. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function up() |
|
15 | + { |
|
16 | + Schema::create('jobs', function (Blueprint $table) { |
|
17 | + $table->bigIncrements('id'); |
|
18 | + $table->string('queue'); |
|
19 | + $table->longText('payload'); |
|
20 | + $table->tinyInteger('attempts')->unsigned(); |
|
21 | + $table->unsignedInteger('reserved_at')->nullable(); |
|
22 | + $table->unsignedInteger('available_at'); |
|
23 | + $table->unsignedInteger('created_at'); |
|
24 | 24 | |
25 | - $table->index(['queue', 'reserved_at']); |
|
26 | - }); |
|
27 | - } |
|
25 | + $table->index(['queue', 'reserved_at']); |
|
26 | + }); |
|
27 | + } |
|
28 | 28 | |
29 | - /** |
|
30 | - * Reverse the migrations. |
|
31 | - * |
|
32 | - * @return void |
|
33 | - */ |
|
34 | - public function down() |
|
35 | - { |
|
36 | - Schema::dropIfExists('jobs'); |
|
37 | - } |
|
29 | + /** |
|
30 | + * Reverse the migrations. |
|
31 | + * |
|
32 | + * @return void |
|
33 | + */ |
|
34 | + public function down() |
|
35 | + { |
|
36 | + Schema::dropIfExists('jobs'); |
|
37 | + } |
|
38 | 38 | } |
@@ -2,25 +2,25 @@ |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | |
5 | - /** |
|
6 | - * List of error messages used in core module. |
|
7 | - */ |
|
8 | - 'unAuthorized' => 'Please login before any action', |
|
9 | - 'invalidRefreshToken' => 'Invalid refresh token', |
|
10 | - 'noPermissions' => 'No permissions', |
|
11 | - 'loginFailed' => 'Wrong mail or password', |
|
12 | - 'noSocialEmail' => 'Couldn\'t retrieve email', |
|
13 | - 'userAlreadyRegistered' => 'User already registered. Please login using email and password', |
|
14 | - 'connectionError' => 'Connection error', |
|
15 | - 'redisNotRunning' => 'Your redis notification server is\'t running', |
|
16 | - 'dbQueryError' => 'Please check the given inputes', |
|
17 | - 'cannotCreateSetting' => 'Can\'t create setting', |
|
18 | - 'cannotUpdateSettingKey' => 'Can\'t update setting key', |
|
19 | - 'userIsBlocked' => 'You have been blocked', |
|
20 | - 'invalidResetToken' => 'Reset password token is invalid', |
|
21 | - 'invalidResetPassword' => 'Reset password is invalid', |
|
22 | - 'invalidOldPassword' => 'Old password is invalid', |
|
23 | - 'notFound' => 'The requested :replace not found', |
|
24 | - 'generalError' => 'Something went wrong', |
|
5 | + /** |
|
6 | + * List of error messages used in core module. |
|
7 | + */ |
|
8 | + 'unAuthorized' => 'Please login before any action', |
|
9 | + 'invalidRefreshToken' => 'Invalid refresh token', |
|
10 | + 'noPermissions' => 'No permissions', |
|
11 | + 'loginFailed' => 'Wrong mail or password', |
|
12 | + 'noSocialEmail' => 'Couldn\'t retrieve email', |
|
13 | + 'userAlreadyRegistered' => 'User already registered. Please login using email and password', |
|
14 | + 'connectionError' => 'Connection error', |
|
15 | + 'redisNotRunning' => 'Your redis notification server is\'t running', |
|
16 | + 'dbQueryError' => 'Please check the given inputes', |
|
17 | + 'cannotCreateSetting' => 'Can\'t create setting', |
|
18 | + 'cannotUpdateSettingKey' => 'Can\'t update setting key', |
|
19 | + 'userIsBlocked' => 'You have been blocked', |
|
20 | + 'invalidResetToken' => 'Reset password token is invalid', |
|
21 | + 'invalidResetPassword' => 'Reset password is invalid', |
|
22 | + 'invalidOldPassword' => 'Old password is invalid', |
|
23 | + 'notFound' => 'The requested :replace not found', |
|
24 | + 'generalError' => 'Something went wrong', |
|
25 | 25 | |
26 | 26 | ]; |
27 | 27 | \ No newline at end of file |
@@ -2,25 +2,25 @@ |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | |
5 | - /** |
|
6 | - * List of error messages used in core module. |
|
7 | - */ |
|
8 | - 'unAuthorized' => 'من فضلك قم بتسجيل الدخول', |
|
9 | - 'invalidRefreshToken' => 'رمز التحديث غير صالح', |
|
10 | - 'noPermissions' => 'لا توجد صلاحية', |
|
11 | - 'loginFailed' => 'خطأ في البريد لاكتروني او كلمة المرور', |
|
12 | - 'noSocialEmail' => 'لا يمكن الحصول علي تابريد الاكتروني', |
|
13 | - 'userAlreadyRegistered' => 'المستخد مسجل بالفعل.سجل الدخول بالبريد الاكتروني و كلمة السر', |
|
14 | - 'connectionError' => 'خطأ في الاتصال', |
|
15 | - 'redisNotRunning' => 'سيرفير الاشعارات لايعمل', |
|
16 | - 'dbQueryError' => 'خطا في البيانات', |
|
17 | - 'cannotCreateSetting' => 'لا يمكن اضافة اعدادات', |
|
18 | - 'cannotUpdateSettingKey' => 'لا يمكن تعديل اعدادات', |
|
19 | - 'userIsBlocked' => 'لقد تم حظرك', |
|
20 | - 'invalidResetToken' => 'رمز تعديل كلمة المرور خطا', |
|
21 | - 'invalidResetPassword' => 'خطا في نعديل كلمة المرور', |
|
22 | - 'invalidOldPassword' => 'كلمة السر القديمه خطا', |
|
23 | - 'notFound' => 'ال :replace المطلوب غير موجود', |
|
24 | - 'generalError' => 'حدث خطا ما', |
|
5 | + /** |
|
6 | + * List of error messages used in core module. |
|
7 | + */ |
|
8 | + 'unAuthorized' => 'من فضلك قم بتسجيل الدخول', |
|
9 | + 'invalidRefreshToken' => 'رمز التحديث غير صالح', |
|
10 | + 'noPermissions' => 'لا توجد صلاحية', |
|
11 | + 'loginFailed' => 'خطأ في البريد لاكتروني او كلمة المرور', |
|
12 | + 'noSocialEmail' => 'لا يمكن الحصول علي تابريد الاكتروني', |
|
13 | + 'userAlreadyRegistered' => 'المستخد مسجل بالفعل.سجل الدخول بالبريد الاكتروني و كلمة السر', |
|
14 | + 'connectionError' => 'خطأ في الاتصال', |
|
15 | + 'redisNotRunning' => 'سيرفير الاشعارات لايعمل', |
|
16 | + 'dbQueryError' => 'خطا في البيانات', |
|
17 | + 'cannotCreateSetting' => 'لا يمكن اضافة اعدادات', |
|
18 | + 'cannotUpdateSettingKey' => 'لا يمكن تعديل اعدادات', |
|
19 | + 'userIsBlocked' => 'لقد تم حظرك', |
|
20 | + 'invalidResetToken' => 'رمز تعديل كلمة المرور خطا', |
|
21 | + 'invalidResetPassword' => 'خطا في نعديل كلمة المرور', |
|
22 | + 'invalidOldPassword' => 'كلمة السر القديمه خطا', |
|
23 | + 'notFound' => 'ال :replace المطلوب غير موجود', |
|
24 | + 'generalError' => 'حدث خطا ما', |
|
25 | 25 | |
26 | 26 | ]; |
27 | 27 | \ No newline at end of file |
@@ -8,35 +8,35 @@ |
||
8 | 8 | |
9 | 9 | class GroupsController extends BaseApiController |
10 | 10 | { |
11 | - /** |
|
12 | - * The name of the model that is used by the base api controller |
|
13 | - * to preform actions like (add, edit ... etc). |
|
14 | - * @var string |
|
15 | - */ |
|
16 | - protected $model = 'groups'; |
|
11 | + /** |
|
12 | + * The name of the model that is used by the base api controller |
|
13 | + * to preform actions like (add, edit ... etc). |
|
14 | + * @var string |
|
15 | + */ |
|
16 | + protected $model = 'groups'; |
|
17 | 17 | |
18 | - /** |
|
19 | - * The validations rules used by the base api controller |
|
20 | - * to check before add. |
|
21 | - * @var array |
|
22 | - */ |
|
23 | - protected $validationRules = [ |
|
24 | - 'name' => 'required|string|max:100|unique:groups,name,{id}' |
|
25 | - ]; |
|
18 | + /** |
|
19 | + * The validations rules used by the base api controller |
|
20 | + * to check before add. |
|
21 | + * @var array |
|
22 | + */ |
|
23 | + protected $validationRules = [ |
|
24 | + 'name' => 'required|string|max:100|unique:groups,name,{id}' |
|
25 | + ]; |
|
26 | 26 | |
27 | - /** |
|
28 | - * Handle an assign permissions to group request. |
|
29 | - * |
|
30 | - * @param \Illuminate\Http\Request $request |
|
31 | - * @return \Illuminate\Http\Response |
|
32 | - */ |
|
33 | - public function assignpermissions(Request $request) |
|
34 | - { |
|
35 | - $this->validate($request, [ |
|
36 | - 'permission_ids' => 'required|exists:permissions,id', |
|
37 | - 'group_id' => 'required|array|exists:groups,id' |
|
38 | - ]); |
|
27 | + /** |
|
28 | + * Handle an assign permissions to group request. |
|
29 | + * |
|
30 | + * @param \Illuminate\Http\Request $request |
|
31 | + * @return \Illuminate\Http\Response |
|
32 | + */ |
|
33 | + public function assignpermissions(Request $request) |
|
34 | + { |
|
35 | + $this->validate($request, [ |
|
36 | + 'permission_ids' => 'required|exists:permissions,id', |
|
37 | + 'group_id' => 'required|array|exists:groups,id' |
|
38 | + ]); |
|
39 | 39 | |
40 | - return \Response::json($this->repo->assignPermissions($request->get('group_id'), $request->get('permission_ids')), 200); |
|
41 | - } |
|
40 | + return \Response::json($this->repo->assignPermissions($request->get('group_id'), $request->get('permission_ids')), 200); |
|
41 | + } |
|
42 | 42 | } |
@@ -6,23 +6,23 @@ |
||
6 | 6 | |
7 | 7 | class OauthClient extends Client |
8 | 8 | { |
9 | - protected $dates = ['created_at', 'updated_at']; |
|
10 | - protected $fillable = ['name', 'redirect', 'user_id', 'personal_access_client', 'password_client', 'revoked']; |
|
11 | - public $searchable = ['name']; |
|
9 | + protected $dates = ['created_at', 'updated_at']; |
|
10 | + protected $fillable = ['name', 'redirect', 'user_id', 'personal_access_client', 'password_client', 'revoked']; |
|
11 | + public $searchable = ['name']; |
|
12 | 12 | |
13 | - public function getCreatedAtAttribute($value) |
|
14 | - { |
|
15 | - return \Carbon\Carbon::parse($value)->addHours(\Session::get('timeZoneDiff'))->toDateTimeString(); |
|
16 | - } |
|
13 | + public function getCreatedAtAttribute($value) |
|
14 | + { |
|
15 | + return \Carbon\Carbon::parse($value)->addHours(\Session::get('timeZoneDiff'))->toDateTimeString(); |
|
16 | + } |
|
17 | 17 | |
18 | - public function getUpdatedAtAttribute($value) |
|
19 | - { |
|
20 | - return \Carbon\Carbon::parse($value)->addHours(\Session::get('timeZoneDiff'))->toDateTimeString(); |
|
21 | - } |
|
18 | + public function getUpdatedAtAttribute($value) |
|
19 | + { |
|
20 | + return \Carbon\Carbon::parse($value)->addHours(\Session::get('timeZoneDiff'))->toDateTimeString(); |
|
21 | + } |
|
22 | 22 | |
23 | - public static function boot() |
|
24 | - { |
|
25 | - parent::boot(); |
|
26 | - parent::observe(\App::make('App\Modules\V1\Acl\ModelObservers\OauthClientObserver')); |
|
27 | - } |
|
23 | + public static function boot() |
|
24 | + { |
|
25 | + parent::boot(); |
|
26 | + parent::observe(\App::make('App\Modules\V1\Acl\ModelObservers\OauthClientObserver')); |
|
27 | + } |
|
28 | 28 | } |
@@ -5,53 +5,53 @@ |
||
5 | 5 | */ |
6 | 6 | class OauthClientObserver { |
7 | 7 | |
8 | - public function saving($model) |
|
9 | - { |
|
10 | - // |
|
11 | - } |
|
12 | - |
|
13 | - public function saved($model) |
|
14 | - { |
|
15 | - // |
|
16 | - } |
|
17 | - |
|
18 | - public function creating($model) |
|
19 | - { |
|
20 | - $model->secret = str_random(40); |
|
21 | - } |
|
22 | - |
|
23 | - public function created($model) |
|
24 | - { |
|
25 | - // |
|
26 | - } |
|
27 | - |
|
28 | - public function updating($model) |
|
29 | - { |
|
30 | - // |
|
31 | - } |
|
32 | - |
|
33 | - public function updated($model) |
|
34 | - { |
|
35 | - // |
|
36 | - } |
|
37 | - |
|
38 | - public function deleting($model) |
|
39 | - { |
|
40 | - // |
|
41 | - } |
|
42 | - |
|
43 | - public function deleted($model) |
|
44 | - { |
|
45 | - // |
|
46 | - } |
|
47 | - |
|
48 | - public function restoring($model) |
|
49 | - { |
|
50 | - // |
|
51 | - } |
|
52 | - |
|
53 | - public function restored($model) |
|
54 | - { |
|
55 | - // |
|
56 | - } |
|
8 | + public function saving($model) |
|
9 | + { |
|
10 | + // |
|
11 | + } |
|
12 | + |
|
13 | + public function saved($model) |
|
14 | + { |
|
15 | + // |
|
16 | + } |
|
17 | + |
|
18 | + public function creating($model) |
|
19 | + { |
|
20 | + $model->secret = str_random(40); |
|
21 | + } |
|
22 | + |
|
23 | + public function created($model) |
|
24 | + { |
|
25 | + // |
|
26 | + } |
|
27 | + |
|
28 | + public function updating($model) |
|
29 | + { |
|
30 | + // |
|
31 | + } |
|
32 | + |
|
33 | + public function updated($model) |
|
34 | + { |
|
35 | + // |
|
36 | + } |
|
37 | + |
|
38 | + public function deleting($model) |
|
39 | + { |
|
40 | + // |
|
41 | + } |
|
42 | + |
|
43 | + public function deleted($model) |
|
44 | + { |
|
45 | + // |
|
46 | + } |
|
47 | + |
|
48 | + public function restoring($model) |
|
49 | + { |
|
50 | + // |
|
51 | + } |
|
52 | + |
|
53 | + public function restored($model) |
|
54 | + { |
|
55 | + // |
|
56 | + } |
|
57 | 57 | } |
58 | 58 | \ No newline at end of file |
@@ -6,18 +6,18 @@ |
||
6 | 6 | |
7 | 7 | class AclDatabaseSeeder extends Seeder |
8 | 8 | { |
9 | - /** |
|
10 | - * Run the database seeds. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function run() |
|
15 | - { |
|
16 | - $this->call(ClearDataSeeder::class); |
|
17 | - $this->call(UsersTableSeeder::class); |
|
18 | - $this->call(GroupsTableSeeder::class); |
|
19 | - $this->call(PermissionsTableSeeder::class); |
|
20 | - $this->call(OauthClientsTableSeeder::class); |
|
21 | - $this->call(AssignRelationsSeeder::class); |
|
22 | - } |
|
9 | + /** |
|
10 | + * Run the database seeds. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function run() |
|
15 | + { |
|
16 | + $this->call(ClearDataSeeder::class); |
|
17 | + $this->call(UsersTableSeeder::class); |
|
18 | + $this->call(GroupsTableSeeder::class); |
|
19 | + $this->call(PermissionsTableSeeder::class); |
|
20 | + $this->call(OauthClientsTableSeeder::class); |
|
21 | + $this->call(AssignRelationsSeeder::class); |
|
22 | + } |
|
23 | 23 | } |