@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('users', function (Blueprint $table) { |
|
15 | + Schema::create('users', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | $table->string('name', 100)->nullable(); |
18 | 18 | $table->string('email')->unique(); |
@@ -13,28 +13,28 @@ |
||
13 | 13 | public function up() |
14 | 14 | { |
15 | 15 | Schema::create('users', function (Blueprint $table) { |
16 | - $table->increments('id'); |
|
17 | - $table->string('name', 100)->nullable(); |
|
18 | - $table->string('email')->unique(); |
|
19 | - $table->string('password', 60)->nullable(); |
|
20 | - $table->boolean('blocked')->default(0); |
|
21 | - $table->softDeletes(); |
|
22 | - $table->rememberToken(); |
|
23 | - $table->timestamps(); |
|
24 | - }); |
|
16 | + $table->increments('id'); |
|
17 | + $table->string('name', 100)->nullable(); |
|
18 | + $table->string('email')->unique(); |
|
19 | + $table->string('password', 60)->nullable(); |
|
20 | + $table->boolean('blocked')->default(0); |
|
21 | + $table->softDeletes(); |
|
22 | + $table->rememberToken(); |
|
23 | + $table->timestamps(); |
|
24 | + }); |
|
25 | 25 | |
26 | 26 | /** |
27 | 27 | * Create Default users. |
28 | 28 | */ |
29 | 29 | \DB::table('users')->insertGetId( |
30 | - [ |
|
30 | + [ |
|
31 | 31 | 'name' => 'Admin', |
32 | 32 | 'email' => '[email protected]', |
33 | 33 | 'password' => bcrypt('123456'), |
34 | 34 | 'created_at' => \DB::raw('NOW()'), |
35 | 35 | 'updated_at' => \DB::raw('NOW()') |
36 | 36 | ] |
37 | - ); |
|
37 | + ); |
|
38 | 38 | } |
39 | 39 | |
40 | 40 | /** |
@@ -2,8 +2,8 @@ |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | |
5 | - /** |
|
6 | - * Here goes your notification messages. |
|
7 | - */ |
|
5 | + /** |
|
6 | + * Here goes your notification messages. |
|
7 | + */ |
|
8 | 8 | |
9 | 9 | ]; |
10 | 10 | \ No newline at end of file |
@@ -4,39 +4,39 @@ |
||
4 | 4 | |
5 | 5 | abstract class AbstractRepositoryContainer implements RepositoryContainerInterface |
6 | 6 | { |
7 | - /** |
|
8 | - * Construct the repository class name based on |
|
9 | - * the method name called, search in the |
|
10 | - * given namespaces for the class and |
|
11 | - * return an instance. |
|
12 | - * |
|
13 | - * @param string $name the called method name |
|
14 | - * @param array $arguments the method arguments |
|
15 | - * @return object |
|
16 | - */ |
|
17 | - public function __call($name, $arguments) |
|
18 | - { |
|
19 | - foreach ($this->getRepoNameSpace() as $repoNameSpace) |
|
20 | - { |
|
21 | - $class = rtrim($repoNameSpace, '\\') . '\\' . ucfirst(str_singular($name)) . 'Repository'; |
|
22 | - if (class_exists($class)) |
|
23 | - { |
|
24 | - \App::singleton($class, function ($app) use ($class) { |
|
7 | + /** |
|
8 | + * Construct the repository class name based on |
|
9 | + * the method name called, search in the |
|
10 | + * given namespaces for the class and |
|
11 | + * return an instance. |
|
12 | + * |
|
13 | + * @param string $name the called method name |
|
14 | + * @param array $arguments the method arguments |
|
15 | + * @return object |
|
16 | + */ |
|
17 | + public function __call($name, $arguments) |
|
18 | + { |
|
19 | + foreach ($this->getRepoNameSpace() as $repoNameSpace) |
|
20 | + { |
|
21 | + $class = rtrim($repoNameSpace, '\\') . '\\' . ucfirst(str_singular($name)) . 'Repository'; |
|
22 | + if (class_exists($class)) |
|
23 | + { |
|
24 | + \App::singleton($class, function ($app) use ($class) { |
|
25 | 25 | |
26 | - return new \App\Modules\V1\Core\Decorators\CachingDecorator(new $class, $app['cache.store']); |
|
27 | - }); |
|
26 | + return new \App\Modules\V1\Core\Decorators\CachingDecorator(new $class, $app['cache.store']); |
|
27 | + }); |
|
28 | 28 | |
29 | - return \App::make($class); |
|
30 | - } |
|
31 | - } |
|
32 | - } |
|
29 | + return \App::make($class); |
|
30 | + } |
|
31 | + } |
|
32 | + } |
|
33 | 33 | |
34 | - /** |
|
35 | - * Abstract methods that return the necessary |
|
36 | - * information (repositories namespaces) |
|
37 | - * needed to preform the previous actions. |
|
38 | - * |
|
39 | - * @return array |
|
40 | - */ |
|
41 | - abstract protected function getRepoNameSpace(); |
|
34 | + /** |
|
35 | + * Abstract methods that return the necessary |
|
36 | + * information (repositories namespaces) |
|
37 | + * needed to preform the previous actions. |
|
38 | + * |
|
39 | + * @return array |
|
40 | + */ |
|
41 | + abstract protected function getRepoNameSpace(); |
|
42 | 42 | } |
43 | 43 | \ No newline at end of file |
@@ -18,10 +18,10 @@ |
||
18 | 18 | { |
19 | 19 | foreach ($this->getRepoNameSpace() as $repoNameSpace) |
20 | 20 | { |
21 | - $class = rtrim($repoNameSpace, '\\') . '\\' . ucfirst(str_singular($name)) . 'Repository'; |
|
21 | + $class = rtrim($repoNameSpace, '\\').'\\'.ucfirst(str_singular($name)).'Repository'; |
|
22 | 22 | if (class_exists($class)) |
23 | 23 | { |
24 | - \App::singleton($class, function ($app) use ($class) { |
|
24 | + \App::singleton($class, function($app) use ($class) { |
|
25 | 25 | |
26 | 26 | return new \App\Modules\V1\Core\Decorators\CachingDecorator(new $class, $app['cache.store']); |
27 | 27 | }); |
@@ -13,13 +13,13 @@ |
||
13 | 13 | public function up() |
14 | 14 | { |
15 | 15 | Schema::create('settings', function (Blueprint $table) { |
16 | - $table->increments('id'); |
|
17 | - $table->string('name',100); |
|
18 | - $table->string('key',100)->unique(); |
|
19 | - $table->text('value')->nullable(); |
|
20 | - $table->softDeletes(); |
|
21 | - $table->timestamps(); |
|
22 | - }); |
|
16 | + $table->increments('id'); |
|
17 | + $table->string('name',100); |
|
18 | + $table->string('key',100)->unique(); |
|
19 | + $table->text('value')->nullable(); |
|
20 | + $table->softDeletes(); |
|
21 | + $table->timestamps(); |
|
22 | + }); |
|
23 | 23 | } |
24 | 24 | |
25 | 25 | /** |
@@ -12,10 +12,10 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('settings', function (Blueprint $table) { |
|
15 | + Schema::create('settings', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | - $table->string('name',100); |
|
18 | - $table->string('key',100)->unique(); |
|
17 | + $table->string('name', 100); |
|
18 | + $table->string('key', 100)->unique(); |
|
19 | 19 | $table->text('value')->nullable(); |
20 | 20 | $table->softDeletes(); |
21 | 21 | $table->timestamps(); |
@@ -8,20 +8,20 @@ |
||
8 | 8 | |
9 | 9 | class SettingsController 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 = 'settings'; |
|
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 = 'settings'; |
|
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', |
|
25 | - 'value' => 'required|string' |
|
26 | - ]; |
|
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', |
|
25 | + 'value' => 'required|string' |
|
26 | + ]; |
|
27 | 27 | } |
@@ -13,14 +13,14 @@ |
||
13 | 13 | * to preform actions like (add, edit ... etc). |
14 | 14 | * @var string |
15 | 15 | */ |
16 | - protected $model = 'settings'; |
|
16 | + protected $model = 'settings'; |
|
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', |
25 | 25 | 'value' => 'required|string' |
26 | 26 | ]; |
@@ -7,26 +7,26 @@ |
||
7 | 7 | class ModuleServiceProvider extends ServiceProvider |
8 | 8 | { |
9 | 9 | /** |
10 | - * Bootstrap the module services. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function boot() |
|
15 | - { |
|
16 | - $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'reporting'); |
|
17 | - $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'reporting'); |
|
10 | + * Bootstrap the module services. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function boot() |
|
15 | + { |
|
16 | + $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'reporting'); |
|
17 | + $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'reporting'); |
|
18 | 18 | |
19 | - $factory = app('Illuminate\Database\Eloquent\Factory'); |
|
20 | - $factory->load(__DIR__.'/../Database/Factories'); |
|
21 | - } |
|
19 | + $factory = app('Illuminate\Database\Eloquent\Factory'); |
|
20 | + $factory->load(__DIR__.'/../Database/Factories'); |
|
21 | + } |
|
22 | 22 | |
23 | - /** |
|
24 | - * Register the module services. |
|
25 | - * |
|
26 | - * @return void |
|
27 | - */ |
|
28 | - public function register() |
|
29 | - { |
|
30 | - $this->app->register(RouteServiceProvider::class); |
|
31 | - } |
|
23 | + /** |
|
24 | + * Register the module services. |
|
25 | + * |
|
26 | + * @return void |
|
27 | + */ |
|
28 | + public function register() |
|
29 | + { |
|
30 | + $this->app->register(RouteServiceProvider::class); |
|
31 | + } |
|
32 | 32 | } |
@@ -7,26 +7,26 @@ |
||
7 | 7 | class ModuleServiceProvider extends ServiceProvider |
8 | 8 | { |
9 | 9 | /** |
10 | - * Bootstrap the module services. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function boot() |
|
15 | - { |
|
16 | - $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'notification'); |
|
17 | - $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'notification'); |
|
10 | + * Bootstrap the module services. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function boot() |
|
15 | + { |
|
16 | + $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'notification'); |
|
17 | + $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'notification'); |
|
18 | 18 | |
19 | - $factory = app('Illuminate\Database\Eloquent\Factory'); |
|
20 | - $factory->load(__DIR__.'/../Database/Factories'); |
|
21 | - } |
|
19 | + $factory = app('Illuminate\Database\Eloquent\Factory'); |
|
20 | + $factory->load(__DIR__.'/../Database/Factories'); |
|
21 | + } |
|
22 | 22 | |
23 | - /** |
|
24 | - * Register the module services. |
|
25 | - * |
|
26 | - * @return void |
|
27 | - */ |
|
28 | - public function register() |
|
29 | - { |
|
30 | - $this->app->register(RouteServiceProvider::class); |
|
31 | - } |
|
23 | + /** |
|
24 | + * Register the module services. |
|
25 | + * |
|
26 | + * @return void |
|
27 | + */ |
|
28 | + public function register() |
|
29 | + { |
|
30 | + $this->app->register(RouteServiceProvider::class); |
|
31 | + } |
|
32 | 32 | } |
@@ -6,27 +6,27 @@ |
||
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', 'acl'); |
|
17 | - $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'acl'); |
|
9 | + /** |
|
10 | + * Bootstrap the module services. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function boot() |
|
15 | + { |
|
16 | + $this->loadTranslationsFrom(__DIR__.'/../Resources/Lang', 'acl'); |
|
17 | + $this->loadViewsFrom(__DIR__.'/../Resources/Views', 'acl'); |
|
18 | 18 | |
19 | - $factory = app('Illuminate\Database\Eloquent\Factory'); |
|
20 | - $factory->load(__DIR__.'/../Database/Factories'); |
|
21 | - } |
|
19 | + $factory = app('Illuminate\Database\Eloquent\Factory'); |
|
20 | + $factory->load(__DIR__.'/../Database/Factories'); |
|
21 | + } |
|
22 | 22 | |
23 | - /** |
|
24 | - * Register the module services. |
|
25 | - * |
|
26 | - * @return void |
|
27 | - */ |
|
28 | - public function register() |
|
29 | - { |
|
30 | - $this->app->register(RouteServiceProvider::class); |
|
31 | - } |
|
23 | + /** |
|
24 | + * Register the module services. |
|
25 | + * |
|
26 | + * @return void |
|
27 | + */ |
|
28 | + public function register() |
|
29 | + { |
|
30 | + $this->app->register(RouteServiceProvider::class); |
|
31 | + } |
|
32 | 32 | } |
@@ -6,15 +6,15 @@ |
||
6 | 6 | |
7 | 7 | class ClearDataSeeder extends Seeder |
8 | 8 | { |
9 | - /** |
|
10 | - * Run the database seeds. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function run() |
|
15 | - { |
|
16 | - $permissions = \DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
17 | - \DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
|
18 | - $permissions->delete(); |
|
19 | - } |
|
9 | + /** |
|
10 | + * Run the database seeds. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function run() |
|
15 | + { |
|
16 | + $permissions = \DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
17 | + \DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
|
18 | + $permissions->delete(); |
|
19 | + } |
|
20 | 20 | } |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function run() |
15 | 15 | { |
16 | - $permissions = \DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
16 | + $permissions = \DB::table('permissions')->whereIn('model', ['notifications', 'pushNotificationDevices']); |
|
17 | 17 | \DB::table('groups_permissions')->whereIn('permission_id', $permissions->pluck('id'))->delete(); |
18 | 18 | $permissions->delete(); |
19 | 19 | } |