Completed
Push — master ( a38508...8df45b )
by Sherif
02:18
created
src/Modules/Core/Http/Controllers/ApiDocumentController.php 1 patch
Indentation   +63 added lines, -63 removed lines patch added patch discarded remove patch
@@ -5,70 +5,70 @@
 block discarded – undo
5 5
 
6 6
 class ApiDocumentController extends Controller
7 7
 {
8
-    public function index()
9
-    {
10
-        $jsonDoc    = json_decode(file_get_contents(app_path('Modules/Core/Resources/api.json')), true);
11
-        $modules    = $jsonDoc['modules'];
12
-        $reports    = $jsonDoc['reports'];
13
-        $errors     = $jsonDoc['errors'];
14
-        $models     = $jsonDoc['models'];
15
-        $conditions = [
16
-            [
17
-                'title'   => 'email equal [email protected]:',
18
-                'content' => ['email' => '[email protected]']
19
-            ],
20
-            [
21
-                'title'   => 'email equal [email protected] and user is blocked:',
22
-                'content' => ['and' => ['email' => '[email protected]', 'blocked' => 1]]
23
-            ],
24
-            [
25
-                'title'   => 'email equal [email protected] or user is blocked:',
26
-                'content' => ['or' => ['email' => '[email protected]', 'blocked' => 1]]
27
-            ],
28
-            [
29
-                'title'   => 'email contain John:',
30
-                'content' => ['email' => ['op' => 'like', 'val' => '%John%']]
31
-            ],
32
-            [
33
-                'title'   => 'user created after 2016-10-25:',
34
-                'content' => ['created_at' => ['op' => '>', 'val' => '2016-10-25']]
35
-            ],
36
-            [
37
-                'title'   => 'user created between 2016-10-20 and 2016-10-25:',
38
-                'content' => ['created_at' => ['op' => 'between', 'val1' => '2016-10-20', 'val2' => '2016-10-25']]
39
-            ],
40
-            [
41
-                'title'   => 'user id in 1,2,3:',
42
-                'content' => ['id' => ['op' => 'in', 'val' => [1, 2, 3]]]
43
-            ],
44
-            [
45
-                'title'   => 'user name is null:',
46
-                'content' => ['name' => ['op' => 'null']]
47
-            ],
48
-            [
49
-                'title'   => 'user name is not null:',
50
-                'content' => ['name' => ['op' => 'not null']]
51
-            ],
52
-            [
53
-                'title'   => 'user has group admin:',
54
-                'content' => ['groups' => ['op' => 'has', 'val' => ['name' => 'Admin']]]
55
-            ]
56
-        ];
8
+	public function index()
9
+	{
10
+		$jsonDoc    = json_decode(file_get_contents(app_path('Modules/Core/Resources/api.json')), true);
11
+		$modules    = $jsonDoc['modules'];
12
+		$reports    = $jsonDoc['reports'];
13
+		$errors     = $jsonDoc['errors'];
14
+		$models     = $jsonDoc['models'];
15
+		$conditions = [
16
+			[
17
+				'title'   => 'email equal [email protected]:',
18
+				'content' => ['email' => '[email protected]']
19
+			],
20
+			[
21
+				'title'   => 'email equal [email protected] and user is blocked:',
22
+				'content' => ['and' => ['email' => '[email protected]', 'blocked' => 1]]
23
+			],
24
+			[
25
+				'title'   => 'email equal [email protected] or user is blocked:',
26
+				'content' => ['or' => ['email' => '[email protected]', 'blocked' => 1]]
27
+			],
28
+			[
29
+				'title'   => 'email contain John:',
30
+				'content' => ['email' => ['op' => 'like', 'val' => '%John%']]
31
+			],
32
+			[
33
+				'title'   => 'user created after 2016-10-25:',
34
+				'content' => ['created_at' => ['op' => '>', 'val' => '2016-10-25']]
35
+			],
36
+			[
37
+				'title'   => 'user created between 2016-10-20 and 2016-10-25:',
38
+				'content' => ['created_at' => ['op' => 'between', 'val1' => '2016-10-20', 'val2' => '2016-10-25']]
39
+			],
40
+			[
41
+				'title'   => 'user id in 1,2,3:',
42
+				'content' => ['id' => ['op' => 'in', 'val' => [1, 2, 3]]]
43
+			],
44
+			[
45
+				'title'   => 'user name is null:',
46
+				'content' => ['name' => ['op' => 'null']]
47
+			],
48
+			[
49
+				'title'   => 'user name is not null:',
50
+				'content' => ['name' => ['op' => 'not null']]
51
+			],
52
+			[
53
+				'title'   => 'user has group admin:',
54
+				'content' => ['groups' => ['op' => 'has', 'val' => ['name' => 'Admin']]]
55
+			]
56
+		];
57 57
 
58
-        $paginateObject = [
59
-            'total'         => 50,
60
-            'per_page'      => 15,
61
-            'current_page'  => 1,
62
-            'last_page'     => 4,
63
-            'next_page_url' => 'apiUrl?page=2',
64
-            'prev_page_url' => null,
65
-            'from'          => 1,
66
-            'to'            => 15,
67
-            'data'          => ['The model object']
68
-        ];
58
+		$paginateObject = [
59
+			'total'         => 50,
60
+			'per_page'      => 15,
61
+			'current_page'  => 1,
62
+			'last_page'     => 4,
63
+			'next_page_url' => 'apiUrl?page=2',
64
+			'prev_page_url' => null,
65
+			'from'          => 1,
66
+			'to'            => 15,
67
+			'data'          => ['The model object']
68
+		];
69 69
 
70
-        $avaialableReports = \Core::reports()->all();
70
+		$avaialableReports = \Core::reports()->all();
71 71
 
72
-        return view('core::doc', ['modules' => $modules, 'reports' => $reports, 'errors' => $errors, 'conditions' => $conditions, 'models' => $models, 'paginateObject' => json_encode($paginateObject, JSON_PRETTY_PRINT), 'avaialableReports' => $avaialableReports]);
73
-    }
72
+		return view('core::doc', ['modules' => $modules, 'reports' => $reports, 'errors' => $errors, 'conditions' => $conditions, 'models' => $models, 'paginateObject' => json_encode($paginateObject, JSON_PRETTY_PRINT), 'avaialableReports' => $avaialableReports]);
73
+	}
74 74
 }
Please login to merge, or discard this patch.
src/Modules/Core/Resources/Lang/ar/errors.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -2,28 +2,28 @@
 block discarded – undo
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
-    'invalidConfirmationCode' => 'لينك التاكيد غير صالح اة مستخدم من قبل',
24
-    'notFound'                => 'ال :replace المطلوب غير موجود',
25
-    'generalError'            => 'حدث خطا ما',
26
-    'emailNotConfirmed'       => 'بريدك الاكتروني غير مفعل',
27
-    'emailAlreadyConfirmed'   => 'البريد الاكتروني مفع بالقعل'
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
+	'invalidConfirmationCode' => 'لينك التاكيد غير صالح اة مستخدم من قبل',
24
+	'notFound'                => 'ال :replace المطلوب غير موجود',
25
+	'generalError'            => 'حدث خطا ما',
26
+	'emailNotConfirmed'       => 'بريدك الاكتروني غير مفعل',
27
+	'emailAlreadyConfirmed'   => 'البريد الاكتروني مفع بالقعل'
28 28
 
29 29
 ];
Please login to merge, or discard this patch.
src/Modules/Core/Resources/Lang/en/errors.php 1 patch
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -2,28 +2,28 @@
 block discarded – undo
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
-    'invalidConfirmationCode' => 'Confirmation link expired or already used',
24
-    'notFound'                => 'The requested :replace not found',
25
-    'generalError'            => 'Something went wrong',
26
-    'emailNotConfirmed'       => 'Your email isn\'t confirmed',
27
-    'emailAlreadyConfirmed'   => 'Your email is already confirmed'
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
+	'invalidConfirmationCode' => 'Confirmation link expired or already used',
24
+	'notFound'                => 'The requested :replace not found',
25
+	'generalError'            => 'Something went wrong',
26
+	'emailNotConfirmed'       => 'Your email isn\'t confirmed',
27
+	'emailAlreadyConfirmed'   => 'Your email is already confirmed'
28 28
 
29 29
 ];
Please login to merge, or discard this patch.
src/Modules/Core/Facades/CoreConfig.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 class CoreConfig extends Facade
6 6
 {
7
-    protected static function getFacadeAccessor()
8
-    {
9
-        return 'CoreConfig';
10
-    }
7
+	protected static function getFacadeAccessor()
8
+	{
9
+		return 'CoreConfig';
10
+	}
11 11
 }
Please login to merge, or discard this patch.
src/Modules/Core/Facades/Media.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 class Media extends Facade
6 6
 {
7
-    protected static function getFacadeAccessor()
8
-    {
9
-        return 'Media';
10
-    }
7
+	protected static function getFacadeAccessor()
8
+	{
9
+		return 'Media';
10
+	}
11 11
 }
Please login to merge, or discard this patch.
src/Modules/Core/Facades/Core.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 class Core extends Facade
6 6
 {
7
-    protected static function getFacadeAccessor()
8
-    {
9
-        return 'Core';
10
-    }
7
+	protected static function getFacadeAccessor()
8
+	{
9
+		return 'Core';
10
+	}
11 11
 }
Please login to merge, or discard this patch.
src/Modules/Core/Facades/ErrorHandler.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 class ErrorHandler extends Facade
6 6
 {
7
-    protected static function getFacadeAccessor()
8
-    {
9
-        return 'ErrorHandler';
10
-    }
7
+	protected static function getFacadeAccessor()
8
+	{
9
+		return 'ErrorHandler';
10
+	}
11 11
 }
Please login to merge, or discard this patch.
src/Modules/Core/Facades/ApiConsumer.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 class ApiConsumer extends Facade
6 6
 {
7
-    protected static function getFacadeAccessor()
8
-    {
9
-        return 'ApiConsumer';
10
-    }
7
+	protected static function getFacadeAccessor()
8
+	{
9
+		return 'ApiConsumer';
10
+	}
11 11
 }
Please login to merge, or discard this patch.
src/Modules/Core/Providers/RouteServiceProvider.php 1 patch
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -7,73 +7,73 @@
 block discarded – undo
7 7
 
8 8
 class RouteServiceProvider extends ServiceProvider
9 9
 {
10
-    /**
11
-     * This namespace is applied to your controller routes.
12
-     *
13
-     * In addition, it is set as the URL generator's root namespace.
14
-     *
15
-     * @var string
16
-     */
17
-    protected $namespace = 'App\Modules\Core\Http\Controllers';
10
+	/**
11
+	 * This namespace is applied to your controller routes.
12
+	 *
13
+	 * In addition, it is set as the URL generator's root namespace.
14
+	 *
15
+	 * @var string
16
+	 */
17
+	protected $namespace = 'App\Modules\Core\Http\Controllers';
18 18
 
19
-    /**
20
-     * Define your route model bindings, pattern filters, etc.
21
-     *
22
-     * @return void
23
-     */
24
-    public function boot()
25
-    {
26
-        //
19
+	/**
20
+	 * Define your route model bindings, pattern filters, etc.
21
+	 *
22
+	 * @return void
23
+	 */
24
+	public function boot()
25
+	{
26
+		//
27 27
 
28
-        parent::boot();
29
-    }
28
+		parent::boot();
29
+	}
30 30
 
31
-    /**
32
-     * Define the routes for the module.
33
-     *
34
-     * @return void
35
-     */
36
-    public function map()
37
-    {
38
-        $this->mapWebRoutes();
31
+	/**
32
+	 * Define the routes for the module.
33
+	 *
34
+	 * @return void
35
+	 */
36
+	public function map()
37
+	{
38
+		$this->mapWebRoutes();
39 39
 
40
-        $this->mapApiRoutes();
40
+		$this->mapApiRoutes();
41 41
 
42
-        //
43
-    }
42
+		//
43
+	}
44 44
 
45
-    /**
46
-     * Define the "web" routes for the module.
47
-     *
48
-     * These routes all receive session state, CSRF protection, etc.
49
-     *
50
-     * @return void
51
-     */
52
-    protected function mapWebRoutes()
53
-    {
54
-        Route::group([
55
-            'middleware' => 'web',
56
-            'namespace'  => $this->namespace,
57
-        ], function ($router) {
58
-            require module_path('core', 'Routes/web.php');
59
-        });
60
-    }
45
+	/**
46
+	 * Define the "web" routes for the module.
47
+	 *
48
+	 * These routes all receive session state, CSRF protection, etc.
49
+	 *
50
+	 * @return void
51
+	 */
52
+	protected function mapWebRoutes()
53
+	{
54
+		Route::group([
55
+			'middleware' => 'web',
56
+			'namespace'  => $this->namespace,
57
+		], function ($router) {
58
+			require module_path('core', 'Routes/web.php');
59
+		});
60
+	}
61 61
 
62
-    /**
63
-     * Define the "api" routes for the module.
64
-     *
65
-     * These routes are typically stateless.
66
-     *
67
-     * @return void
68
-     */
69
-    protected function mapApiRoutes()
70
-    {
71
-        Route::group([
72
-            'middleware' => 'api',
73
-            'namespace'  => $this->namespace,
74
-            'prefix'     => 'api',
75
-        ], function ($router) {
76
-            require module_path('core', 'Routes/api.php');
77
-        });
78
-    }
62
+	/**
63
+	 * Define the "api" routes for the module.
64
+	 *
65
+	 * These routes are typically stateless.
66
+	 *
67
+	 * @return void
68
+	 */
69
+	protected function mapApiRoutes()
70
+	{
71
+		Route::group([
72
+			'middleware' => 'api',
73
+			'namespace'  => $this->namespace,
74
+			'prefix'     => 'api',
75
+		], function ($router) {
76
+			require module_path('core', 'Routes/api.php');
77
+		});
78
+	}
79 79
 }
Please login to merge, or discard this patch.