Completed
Push — master ( 8023d3...8b2ccd )
by Sherif
10:04
created
src/Modules/Core/Interfaces/BaseRepositoryInterface.php 1 patch
Indentation   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -2,93 +2,93 @@
 block discarded – undo
2 2
 
3 3
 interface BaseRepositoryInterface
4 4
 {
5
-    /**
6
-     * Fetch all records with relations from the storage.
7
-     *
8
-     * @param  array  $relations
9
-     * @param  array  $sortBy
10
-     * @param  array  $desc
11
-     * @param  array  $columns
12
-     * @return collection
13
-     */
14
-    public function all($relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
5
+	/**
6
+	 * Fetch all records with relations from the storage.
7
+	 *
8
+	 * @param  array  $relations
9
+	 * @param  array  $sortBy
10
+	 * @param  array  $desc
11
+	 * @param  array  $columns
12
+	 * @return collection
13
+	 */
14
+	public function all($relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
15 15
 
16
-    /**
17
-     * Fetch all records with relations from storage in pages.
18
-     *
19
-     * @param  integer $perPage
20
-     * @param  array   $relations
21
-     * @param  array   $sortBy
22
-     * @param  array   $desc
23
-     * @param  array   $columns
24
-     * @return collection
25
-     */
26
-    public function paginate($perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
16
+	/**
17
+	 * Fetch all records with relations from storage in pages.
18
+	 *
19
+	 * @param  integer $perPage
20
+	 * @param  array   $relations
21
+	 * @param  array   $sortBy
22
+	 * @param  array   $desc
23
+	 * @param  array   $columns
24
+	 * @return collection
25
+	 */
26
+	public function paginate($perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
27 27
     
28
-    /**
29
-     * Fetch all records with relations based on
30
-     * the given condition from storage in pages.
31
-     *
32
-     * @param  array   $conditions array of conditions
33
-     * @param  integer $perPage
34
-     * @param  array   $relations
35
-     * @param  array   $sortBy
36
-     * @param  array   $desc
37
-     * @param  array   $columns
38
-     * @return collection
39
-     */
40
-    public function paginateBy($conditions, $perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
28
+	/**
29
+	 * Fetch all records with relations based on
30
+	 * the given condition from storage in pages.
31
+	 *
32
+	 * @param  array   $conditions array of conditions
33
+	 * @param  integer $perPage
34
+	 * @param  array   $relations
35
+	 * @param  array   $sortBy
36
+	 * @param  array   $desc
37
+	 * @param  array   $columns
38
+	 * @return collection
39
+	 */
40
+	public function paginateBy($conditions, $perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
41 41
 
42
-     /**
43
-      * Save the given model/models to the storage.
44
-      *
45
-      * @param  array   $data
46
-      * @return mixed
47
-      */
48
-    public function save(array $data);
42
+	 /**
43
+	  * Save the given model/models to the storage.
44
+	  *
45
+	  * @param  array   $data
46
+	  * @return mixed
47
+	  */
48
+	public function save(array $data);
49 49
 
50
-    /**
51
-     * Delete record from the storage based on the given
52
-     * condition.
53
-     *
54
-     * @param  var     $value condition value
55
-     * @param  string  $attribute condition column name
56
-     * @return integer affected rows
57
-     */
58
-    public function delete($value, $attribute = 'id');
50
+	/**
51
+	 * Delete record from the storage based on the given
52
+	 * condition.
53
+	 *
54
+	 * @param  var     $value condition value
55
+	 * @param  string  $attribute condition column name
56
+	 * @return integer affected rows
57
+	 */
58
+	public function delete($value, $attribute = 'id');
59 59
     
60
-    /**
61
-     * Fetch records from the storage based on the given
62
-     * id.
63
-     *
64
-     * @param  integer $id
65
-     * @param  array   $relations
66
-     * @param  array   $columns
67
-     * @return object
68
-     */
69
-    public function find($id, $relations = [], $columns = ['*']);
60
+	/**
61
+	 * Fetch records from the storage based on the given
62
+	 * id.
63
+	 *
64
+	 * @param  integer $id
65
+	 * @param  array   $relations
66
+	 * @param  array   $columns
67
+	 * @return object
68
+	 */
69
+	public function find($id, $relations = [], $columns = ['*']);
70 70
     
71
-    /**
72
-     * Fetch records from the storage based on the given
73
-     * condition.
74
-     *
75
-     * @param  array   $conditions array of conditions
76
-     * @param  array   $relations
77
-     * @param  array   $sortBy
78
-     * @param  array   $desc
79
-     * @param  array   $columns
80
-     * @return collection
81
-     */
82
-    public function findBy($conditions, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
71
+	/**
72
+	 * Fetch records from the storage based on the given
73
+	 * condition.
74
+	 *
75
+	 * @param  array   $conditions array of conditions
76
+	 * @param  array   $relations
77
+	 * @param  array   $sortBy
78
+	 * @param  array   $desc
79
+	 * @param  array   $columns
80
+	 * @return collection
81
+	 */
82
+	public function findBy($conditions, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
83 83
 
84
-    /**
85
-     * Fetch the first record fro the storage based on the given
86
-     * condition.
87
-     *
88
-     * @param  array   $conditions array of conditions
89
-     * @param  array   $relations
90
-     * @param  array   $columns
91
-     * @return object
92
-     */
93
-    public function first($conditions, $relations = [], $columns = ['*']);
84
+	/**
85
+	 * Fetch the first record fro the storage based on the given
86
+	 * condition.
87
+	 *
88
+	 * @param  array   $conditions array of conditions
89
+	 * @param  array   $relations
90
+	 * @param  array   $columns
91
+	 * @return object
92
+	 */
93
+	public function first($conditions, $relations = [], $columns = ['*']);
94 94
 }
Please login to merge, or discard this patch.
src/Modules/Core/Interfaces/BaseServiceInterface.php 1 patch
Indentation   +82 added lines, -82 removed lines patch added patch discarded remove patch
@@ -2,93 +2,93 @@
 block discarded – undo
2 2
 
3 3
 interface BaseServiceInterface
4 4
 {
5
-    /**
6
-     * Fetch all records with relations from the storage.
7
-     *
8
-     * @param  array  $relations
9
-     * @param  array  $sortBy
10
-     * @param  array  $desc
11
-     * @param  array  $columns
12
-     * @return collection
13
-     */
14
-    public function all($relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
5
+	/**
6
+	 * Fetch all records with relations from the storage.
7
+	 *
8
+	 * @param  array  $relations
9
+	 * @param  array  $sortBy
10
+	 * @param  array  $desc
11
+	 * @param  array  $columns
12
+	 * @return collection
13
+	 */
14
+	public function all($relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
15 15
 
16
-    /**
17
-     * Fetch all records with relations from storage in pages.
18
-     *
19
-     * @param  integer $perPage
20
-     * @param  array   $relations
21
-     * @param  array   $sortBy
22
-     * @param  array   $desc
23
-     * @param  array   $columns
24
-     * @return collection
25
-     */
26
-    public function paginate($perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
16
+	/**
17
+	 * Fetch all records with relations from storage in pages.
18
+	 *
19
+	 * @param  integer $perPage
20
+	 * @param  array   $relations
21
+	 * @param  array   $sortBy
22
+	 * @param  array   $desc
23
+	 * @param  array   $columns
24
+	 * @return collection
25
+	 */
26
+	public function paginate($perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
27 27
     
28
-    /**
29
-     * Fetch all records with relations based on
30
-     * the given condition from storage in pages.
31
-     *
32
-     * @param  array   $conditions array of conditions
33
-     * @param  integer $perPage
34
-     * @param  array   $relations
35
-     * @param  array   $sortBy
36
-     * @param  array   $desc
37
-     * @param  array   $columns
38
-     * @return collection
39
-     */
40
-    public function paginateBy($conditions, $perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
28
+	/**
29
+	 * Fetch all records with relations based on
30
+	 * the given condition from storage in pages.
31
+	 *
32
+	 * @param  array   $conditions array of conditions
33
+	 * @param  integer $perPage
34
+	 * @param  array   $relations
35
+	 * @param  array   $sortBy
36
+	 * @param  array   $desc
37
+	 * @param  array   $columns
38
+	 * @return collection
39
+	 */
40
+	public function paginateBy($conditions, $perPage = 15, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
41 41
 
42
-     /**
43
-      * Save the given model/models to the storage.
44
-      *
45
-      * @param  array   $data
46
-      * @return mixed
47
-      */
48
-    public function save(array $data);
42
+	 /**
43
+	  * Save the given model/models to the storage.
44
+	  *
45
+	  * @param  array   $data
46
+	  * @return mixed
47
+	  */
48
+	public function save(array $data);
49 49
 
50
-    /**
51
-     * Delete record from the storage based on the given
52
-     * condition.
53
-     *
54
-     * @param  var     $value condition value
55
-     * @param  string  $attribute condition column name
56
-     * @return integer affected rows
57
-     */
58
-    public function delete($value, $attribute = 'id');
50
+	/**
51
+	 * Delete record from the storage based on the given
52
+	 * condition.
53
+	 *
54
+	 * @param  var     $value condition value
55
+	 * @param  string  $attribute condition column name
56
+	 * @return integer affected rows
57
+	 */
58
+	public function delete($value, $attribute = 'id');
59 59
     
60
-    /**
61
-     * Fetch records from the storage based on the given
62
-     * id.
63
-     *
64
-     * @param  integer $id
65
-     * @param  array   $relations
66
-     * @param  array   $columns
67
-     * @return object
68
-     */
69
-    public function find($id, $relations = [], $columns = ['*']);
60
+	/**
61
+	 * Fetch records from the storage based on the given
62
+	 * id.
63
+	 *
64
+	 * @param  integer $id
65
+	 * @param  array   $relations
66
+	 * @param  array   $columns
67
+	 * @return object
68
+	 */
69
+	public function find($id, $relations = [], $columns = ['*']);
70 70
     
71
-    /**
72
-     * Fetch records from the storage based on the given
73
-     * condition.
74
-     *
75
-     * @param  array   $conditions array of conditions
76
-     * @param  array   $relations
77
-     * @param  array   $sortBy
78
-     * @param  array   $desc
79
-     * @param  array   $columns
80
-     * @return collection
81
-     */
82
-    public function findBy($conditions, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
71
+	/**
72
+	 * Fetch records from the storage based on the given
73
+	 * condition.
74
+	 *
75
+	 * @param  array   $conditions array of conditions
76
+	 * @param  array   $relations
77
+	 * @param  array   $sortBy
78
+	 * @param  array   $desc
79
+	 * @param  array   $columns
80
+	 * @return collection
81
+	 */
82
+	public function findBy($conditions, $relations = [], $sortBy = 'created_at', $desc = 0, $columns = ['*']);
83 83
 
84
-    /**
85
-     * Fetch the first record fro the storage based on the given
86
-     * condition.
87
-     *
88
-     * @param  array   $conditions array of conditions
89
-     * @param  array   $relations
90
-     * @param  array   $columns
91
-     * @return object
92
-     */
93
-    public function first($conditions, $relations = [], $columns = ['*']);
84
+	/**
85
+	 * Fetch the first record fro the storage based on the given
86
+	 * condition.
87
+	 *
88
+	 * @param  array   $conditions array of conditions
89
+	 * @param  array   $relations
90
+	 * @param  array   $columns
91
+	 * @return object
92
+	 */
93
+	public function first($conditions, $relations = [], $columns = ['*']);
94 94
 }
Please login to merge, or discard this patch.
src/Modules/Users/Repositories/UserRepository.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -3,7 +3,6 @@
 block discarded – undo
3 3
 namespace App\Modules\Users\Repositories;
4 4
 
5 5
 use App\Modules\Core\BaseClasses\BaseRepository;
6
-use Illuminate\Support\Arr;
7 6
 use App\Modules\Users\AclUser;
8 7
 
9 8
 class UserRepository extends BaseRepository
Please login to merge, or discard this patch.
Indentation   +45 added lines, -45 removed lines patch added patch discarded remove patch
@@ -6,52 +6,52 @@
 block discarded – undo
6 6
 
7 7
 class UserRepository extends BaseRepository
8 8
 {
9
-    /**
10
-     * Init new object.
11
-     *
12
-     * @param   AclUser $model
13
-     * @return  void
14
-     */
15
-    public function __construct(AclUser $model)
16
-    {
17
-        parent::__construct($model);
18
-    }
9
+	/**
10
+	 * Init new object.
11
+	 *
12
+	 * @param   AclUser $model
13
+	 * @return  void
14
+	 */
15
+	public function __construct(AclUser $model)
16
+	{
17
+		parent::__construct($model);
18
+	}
19 19
 
20
-    /**
21
-     * Detach all roles from the given role.
22
-     *
23
-     * @param  mixed $role
24
-     * @return object
25
-     */
26
-    public function detachRoles($role)
27
-    {
28
-        $role = ! is_int($role) ? $role : $this->find($role);
29
-        $role->roles()->detach();
30
-    }
20
+	/**
21
+	 * Detach all roles from the given role.
22
+	 *
23
+	 * @param  mixed $role
24
+	 * @return object
25
+	 */
26
+	public function detachRoles($role)
27
+	{
28
+		$role = ! is_int($role) ? $role : $this->find($role);
29
+		$role->roles()->detach();
30
+	}
31 31
 
32
-    /**
33
-     * Attach role ids to the given role.
34
-     *
35
-     * @param  mixed $role
36
-     * @param  array $roleIds
37
-     * @return object
38
-     */
39
-    public function attachRoles($role, $roleIds)
40
-    {
41
-        $role = ! is_int($role) ? $role : $this->find($role);
42
-        $role->roles()->attach($roleIds);
43
-    }
32
+	/**
33
+	 * Attach role ids to the given role.
34
+	 *
35
+	 * @param  mixed $role
36
+	 * @param  array $roleIds
37
+	 * @return object
38
+	 */
39
+	public function attachRoles($role, $roleIds)
40
+	{
41
+		$role = ! is_int($role) ? $role : $this->find($role);
42
+		$role->roles()->attach($roleIds);
43
+	}
44 44
 
45
-    /**
46
-     * Count the given user the given roles.
47
-     *
48
-     * @param  mixed    $user
49
-     * @param  string[] $roles
50
-     * @return boolean
51
-     */
52
-    public function countRoles($user, $roles)
53
-    {
54
-        $user = ! is_int($user) ? $user : $this->find($user);
55
-        return $user->roles()->whereIn('name', $roles)->count();
56
-    }
45
+	/**
46
+	 * Count the given user the given roles.
47
+	 *
48
+	 * @param  mixed    $user
49
+	 * @param  string[] $roles
50
+	 * @return boolean
51
+	 */
52
+	public function countRoles($user, $roles)
53
+	{
54
+		$user = ! is_int($user) ? $user : $this->find($user);
55
+		return $user->roles()->whereIn('name', $roles)->count();
56
+	}
57 57
 }
Please login to merge, or discard this patch.
src/Modules/Permissions/Resources/Lang/en/errors.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -2,8 +2,8 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8 8
 
9 9
 ];
Please login to merge, or discard this patch.
Modules/PushNotificationDevices/Services/PushNotificationDeviceService.php 1 patch
Indentation   +52 added lines, -52 removed lines patch added patch discarded remove patch
@@ -10,63 +10,63 @@
 block discarded – undo
10 10
 
11 11
 class PushNotificationDeviceService extends BaseService
12 12
 {
13
-    /**
14
-     * Init new object.
15
-     *
16
-     * @param   PushNotificationDeviceRepository $repo
17
-     * @return  void
18
-     */
19
-    public function __construct(PushNotificationDeviceRepository $repo)
20
-    {
21
-        parent::__construct($repo);
22
-    }
13
+	/**
14
+	 * Init new object.
15
+	 *
16
+	 * @param   PushNotificationDeviceRepository $repo
17
+	 * @return  void
18
+	 */
19
+	public function __construct(PushNotificationDeviceRepository $repo)
20
+	{
21
+		parent::__construct($repo);
22
+	}
23 23
 
24
-    /**
25
-     * Register the given device to the logged in user.
26
-     *
27
-     * @param  array $data
28
-     * @return void
29
-     */
30
-    public function registerDevice($data)
31
-    {
32
-        $data['access_token'] = \Auth::user()->token();
33
-        $data['user_id']      = \Auth::id();
34
-        $device               = $this->repo->first([
35
-            'and' => [
36
-                'device_token' => $data['device_token'],
37
-                'user_id' => $data['user_id']
38
-                ]
39
-            ]);
24
+	/**
25
+	 * Register the given device to the logged in user.
26
+	 *
27
+	 * @param  array $data
28
+	 * @return void
29
+	 */
30
+	public function registerDevice($data)
31
+	{
32
+		$data['access_token'] = \Auth::user()->token();
33
+		$data['user_id']      = \Auth::id();
34
+		$device               = $this->repo->first([
35
+			'and' => [
36
+				'device_token' => $data['device_token'],
37
+				'user_id' => $data['user_id']
38
+				]
39
+			]);
40 40
 
41
-        if ($device) {
42
-            $data['id'] = $device->id;
43
-        }
41
+		if ($device) {
42
+			$data['id'] = $device->id;
43
+		}
44 44
 
45
-        return $this->repo->save($data);
46
-    }
45
+		return $this->repo->save($data);
46
+	}
47 47
 
48
-    /**
49
-     * Generate the given message data.
50
-     *
51
-     * @param  string $title
52
-     * @param  string $message
53
-     * @param  array  $data
54
-     * @return void
55
-     */
56
-    public function generateMessageData($title, $message, $data = [])
57
-    {
58
-        $optionBuilder       = new OptionsBuilder();
59
-        $notificationBuilder = new PayloadNotificationBuilder($title);
60
-        $dataBuilder         = new PayloadDataBuilder();
48
+	/**
49
+	 * Generate the given message data.
50
+	 *
51
+	 * @param  string $title
52
+	 * @param  string $message
53
+	 * @param  array  $data
54
+	 * @return void
55
+	 */
56
+	public function generateMessageData($title, $message, $data = [])
57
+	{
58
+		$optionBuilder       = new OptionsBuilder();
59
+		$notificationBuilder = new PayloadNotificationBuilder($title);
60
+		$dataBuilder         = new PayloadDataBuilder();
61 61
 
62
-        $optionBuilder->setTimeToLive(60 * 20);
63
-        $notificationBuilder->setBody($message);
64
-        $dataBuilder->addData($data);
62
+		$optionBuilder->setTimeToLive(60 * 20);
63
+		$notificationBuilder->setBody($message);
64
+		$dataBuilder->addData($data);
65 65
 
66
-        $options             = $optionBuilder->build();
67
-        $notification        = $notificationBuilder->build();
68
-        $data                = $dataBuilder->build();
66
+		$options             = $optionBuilder->build();
67
+		$notification        = $notificationBuilder->build();
68
+		$data                = $dataBuilder->build();
69 69
 
70
-        return compact('options', 'notification', 'data');
71
-    }
70
+		return compact('options', 'notification', 'data');
71
+	}
72 72
 }
Please login to merge, or discard this patch.
src/Modules/Core/Resources/Lang/en/errors.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
8
-    'connectionError'         => 'Connection error',
9
-    'redisNotRunning'         => 'Your redis notification server is\'t running',
10
-    'dbQueryError'            => 'Please check the given inputes',
11
-    'cannotCreateSetting'     => 'Can\'t create setting',
12
-    'cannotUpdateSettingKey'  => 'Can\'t update setting key',
13
-    'notFound'                => 'The requested :replace not found'
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8
+	'connectionError'         => 'Connection error',
9
+	'redisNotRunning'         => 'Your redis notification server is\'t running',
10
+	'dbQueryError'            => 'Please check the given inputes',
11
+	'cannotCreateSetting'     => 'Can\'t create setting',
12
+	'cannotUpdateSettingKey'  => 'Can\'t update setting key',
13
+	'notFound'                => 'The requested :replace not found'
14 14
 
15 15
 ];
Please login to merge, or discard this patch.
src/Modules/Core/Resources/Lang/ar/errors.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -2,14 +2,14 @@
 block discarded – undo
2 2
 
3 3
 return [
4 4
     
5
-    /**
6
-     * Here goes your error messages.
7
-     */
8
-    'connectionError'         => 'خطأ في الاتصال',
9
-    'redisNotRunning'         => 'سيرفير الاشعارات لايعمل',
10
-    'dbQueryError'            => 'خطا في البيانات',
11
-    'cannotCreateSetting'     => 'لا يمكن اضافة اعدادات',
12
-    'cannotUpdateSettingKey'  => 'لا يمكن تعديل اعدادات',
13
-    'notFound'                => 'ال :replace المطلوب غير موجود'
5
+	/**
6
+	 * Here goes your error messages.
7
+	 */
8
+	'connectionError'         => 'خطأ في الاتصال',
9
+	'redisNotRunning'         => 'سيرفير الاشعارات لايعمل',
10
+	'dbQueryError'            => 'خطا في البيانات',
11
+	'cannotCreateSetting'     => 'لا يمكن اضافة اعدادات',
12
+	'cannotUpdateSettingKey'  => 'لا يمكن تعديل اعدادات',
13
+	'notFound'                => 'ال :replace المطلوب غير موجود'
14 14
 
15 15
 ];
Please login to merge, or discard this patch.
src/Modules/Core/Facades/Errors.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 Errors extends Facade
6 6
 {
7
-    protected static function getFacadeAccessor()
8
-    {
9
-        return 'Errors';
10
-    }
7
+	protected static function getFacadeAccessor()
8
+	{
9
+		return 'Errors';
10
+	}
11 11
 }
Please login to merge, or discard this patch.
src/Modules/Core/Providers/ModuleServiceProvider.php 2 patches
Indentation   +48 added lines, -48 removed lines patch added patch discarded remove patch
@@ -6,53 +6,53 @@
 block discarded – undo
6 6
 
7 7
 class ModuleServiceProvider extends ServiceProvider
8 8
 {
9
-    /**
10
-     * Bootstrap the module services.
11
-     *
12
-     * @return void
13
-     */
14
-    public function boot()
15
-    {
16
-        $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'core');
17
-        $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'core');
18
-
19
-        $this->loadMigrationsFrom(module_path('core', 'Database/Migrations', 'app'));
20
-        $this->loadFactoriesFrom(module_path('core', 'Database/Factories', 'app'));
21
-    }
22
-
23
-    /**
24
-     * Register the module services.
25
-     *
26
-     * @return void
27
-     */
28
-    public function register()
29
-    {
30
-        //Bind Core Facade to the Service Container
31
-        $this->app->singleton('Core', function () {
32
-            return new \App\Modules\Core\Core;
33
-        });
34
-
35
-        //Bind Errors Facade to the Service Container
36
-        $this->app->singleton('Errors', function () {
37
-            return new \App\Modules\Core\Errors\Errors;
38
-        });
39
-
40
-        //Bind CoreConfig Facade to the Service Container
41
-        $this->app->singleton('CoreConfig', function () {
42
-            return new \App\Modules\Core\Utl\CoreConfig;
43
-        });
44
-
45
-        //Bind Media Facade to the Service Container
46
-        $this->app->singleton('Media', function () {
47
-            return new \App\Modules\Core\Utl\Media;
48
-        });
49
-
50
-        //Bind ApiConsumer Facade to the Service Container
51
-        $this->app->singleton('ApiConsumer', function () {
52
-            $app = app();
53
-            return new \App\Modules\Core\Utl\ApiConsumer($app, $app['request'], $app['router']);
54
-        });
9
+	/**
10
+	 * Bootstrap the module services.
11
+	 *
12
+	 * @return void
13
+	 */
14
+	public function boot()
15
+	{
16
+		$this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'core');
17
+		$this->loadViewsFrom(__DIR__.'/../Resources/Views', 'core');
18
+
19
+		$this->loadMigrationsFrom(module_path('core', 'Database/Migrations', 'app'));
20
+		$this->loadFactoriesFrom(module_path('core', 'Database/Factories', 'app'));
21
+	}
22
+
23
+	/**
24
+	 * Register the module services.
25
+	 *
26
+	 * @return void
27
+	 */
28
+	public function register()
29
+	{
30
+		//Bind Core Facade to the Service Container
31
+		$this->app->singleton('Core', function () {
32
+			return new \App\Modules\Core\Core;
33
+		});
34
+
35
+		//Bind Errors Facade to the Service Container
36
+		$this->app->singleton('Errors', function () {
37
+			return new \App\Modules\Core\Errors\Errors;
38
+		});
39
+
40
+		//Bind CoreConfig Facade to the Service Container
41
+		$this->app->singleton('CoreConfig', function () {
42
+			return new \App\Modules\Core\Utl\CoreConfig;
43
+		});
44
+
45
+		//Bind Media Facade to the Service Container
46
+		$this->app->singleton('Media', function () {
47
+			return new \App\Modules\Core\Utl\Media;
48
+		});
49
+
50
+		//Bind ApiConsumer Facade to the Service Container
51
+		$this->app->singleton('ApiConsumer', function () {
52
+			$app = app();
53
+			return new \App\Modules\Core\Utl\ApiConsumer($app, $app['request'], $app['router']);
54
+		});
55 55
         
56
-        $this->app->register(RouteServiceProvider::class);
57
-    }
56
+		$this->app->register(RouteServiceProvider::class);
57
+	}
58 58
 }
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,27 +28,27 @@
 block discarded – undo
28 28
     public function register()
29 29
     {
30 30
         //Bind Core Facade to the Service Container
31
-        $this->app->singleton('Core', function () {
31
+        $this->app->singleton('Core', function() {
32 32
             return new \App\Modules\Core\Core;
33 33
         });
34 34
 
35 35
         //Bind Errors Facade to the Service Container
36
-        $this->app->singleton('Errors', function () {
36
+        $this->app->singleton('Errors', function() {
37 37
             return new \App\Modules\Core\Errors\Errors;
38 38
         });
39 39
 
40 40
         //Bind CoreConfig Facade to the Service Container
41
-        $this->app->singleton('CoreConfig', function () {
41
+        $this->app->singleton('CoreConfig', function() {
42 42
             return new \App\Modules\Core\Utl\CoreConfig;
43 43
         });
44 44
 
45 45
         //Bind Media Facade to the Service Container
46
-        $this->app->singleton('Media', function () {
46
+        $this->app->singleton('Media', function() {
47 47
             return new \App\Modules\Core\Utl\Media;
48 48
         });
49 49
 
50 50
         //Bind ApiConsumer Facade to the Service Container
51
-        $this->app->singleton('ApiConsumer', function () {
51
+        $this->app->singleton('ApiConsumer', function() {
52 52
             $app = app();
53 53
             return new \App\Modules\Core\Utl\ApiConsumer($app, $app['request'], $app['router']);
54 54
         });
Please login to merge, or discard this patch.