@@ -8,31 +8,31 @@ |
||
8 | 8 | |
9 | 9 | class AuthServiceProvider extends ServiceProvider |
10 | 10 | { |
11 | - /** |
|
12 | - * The policy mappings for the application. |
|
13 | - * |
|
14 | - * @var array |
|
15 | - */ |
|
16 | - protected $policies = [ |
|
17 | - 'App\Model' => 'App\Policies\ModelPolicy', |
|
18 | - ]; |
|
11 | + /** |
|
12 | + * The policy mappings for the application. |
|
13 | + * |
|
14 | + * @var array |
|
15 | + */ |
|
16 | + protected $policies = [ |
|
17 | + 'App\Model' => 'App\Policies\ModelPolicy', |
|
18 | + ]; |
|
19 | 19 | |
20 | - /** |
|
21 | - * Register any authentication / authorization services. |
|
22 | - * |
|
23 | - * @return void |
|
24 | - */ |
|
25 | - public function boot() |
|
26 | - { |
|
27 | - $this->registerPolicies(); |
|
20 | + /** |
|
21 | + * Register any authentication / authorization services. |
|
22 | + * |
|
23 | + * @return void |
|
24 | + */ |
|
25 | + public function boot() |
|
26 | + { |
|
27 | + $this->registerPolicies(); |
|
28 | 28 | |
29 | - Passport::routes(function ($router) { |
|
30 | - $router->forAuthorization(); |
|
31 | - $router->forAccessTokens(); |
|
32 | - $router->forPersonalAccessTokens(); |
|
33 | - $router->forTransientTokens(); |
|
34 | - }); |
|
35 | - Passport::tokensExpireIn(\Carbon\Carbon::now()->addMinutes(10)); |
|
36 | - Passport::refreshTokensExpireIn(\Carbon\Carbon::now()->addDays(10)); |
|
37 | - } |
|
29 | + Passport::routes(function ($router) { |
|
30 | + $router->forAuthorization(); |
|
31 | + $router->forAccessTokens(); |
|
32 | + $router->forPersonalAccessTokens(); |
|
33 | + $router->forTransientTokens(); |
|
34 | + }); |
|
35 | + Passport::tokensExpireIn(\Carbon\Carbon::now()->addMinutes(10)); |
|
36 | + Passport::refreshTokensExpireIn(\Carbon\Carbon::now()->addDays(10)); |
|
37 | + } |
|
38 | 38 | } |
@@ -2,7 +2,7 @@ discard block |
||
2 | 2 | |
3 | 3 | return [ |
4 | 4 | |
5 | - /* |
|
5 | + /* |
|
6 | 6 | |-------------------------------------------------------------------------- |
7 | 7 | | Authentication Defaults |
8 | 8 | |-------------------------------------------------------------------------- |
@@ -13,12 +13,12 @@ discard block |
||
13 | 13 | | |
14 | 14 | */ |
15 | 15 | |
16 | - 'defaults' => [ |
|
17 | - 'guard' => 'web', |
|
18 | - 'passwords' => 'users', |
|
19 | - ], |
|
16 | + 'defaults' => [ |
|
17 | + 'guard' => 'web', |
|
18 | + 'passwords' => 'users', |
|
19 | + ], |
|
20 | 20 | |
21 | - /* |
|
21 | + /* |
|
22 | 22 | |-------------------------------------------------------------------------- |
23 | 23 | | Authentication Guards |
24 | 24 | |-------------------------------------------------------------------------- |
@@ -35,19 +35,19 @@ discard block |
||
35 | 35 | | |
36 | 36 | */ |
37 | 37 | |
38 | - 'guards' => [ |
|
39 | - 'web' => [ |
|
40 | - 'driver' => 'session', |
|
41 | - 'provider' => 'users', |
|
42 | - ], |
|
38 | + 'guards' => [ |
|
39 | + 'web' => [ |
|
40 | + 'driver' => 'session', |
|
41 | + 'provider' => 'users', |
|
42 | + ], |
|
43 | 43 | |
44 | - 'api' => [ |
|
45 | - 'driver' => 'passport', |
|
46 | - 'provider' => 'users', |
|
47 | - ], |
|
48 | - ], |
|
44 | + 'api' => [ |
|
45 | + 'driver' => 'passport', |
|
46 | + 'provider' => 'users', |
|
47 | + ], |
|
48 | + ], |
|
49 | 49 | |
50 | - /* |
|
50 | + /* |
|
51 | 51 | |-------------------------------------------------------------------------- |
52 | 52 | | User Providers |
53 | 53 | |-------------------------------------------------------------------------- |
@@ -64,19 +64,19 @@ discard block |
||
64 | 64 | | |
65 | 65 | */ |
66 | 66 | |
67 | - 'providers' => [ |
|
68 | - 'users' => [ |
|
69 | - 'driver' => 'eloquent', |
|
70 | - 'model' => App\Modules\Acl\AclUser::class, |
|
71 | - ], |
|
67 | + 'providers' => [ |
|
68 | + 'users' => [ |
|
69 | + 'driver' => 'eloquent', |
|
70 | + 'model' => App\Modules\Acl\AclUser::class, |
|
71 | + ], |
|
72 | 72 | |
73 | - // 'users' => [ |
|
74 | - // 'driver' => 'database', |
|
75 | - // 'table' => 'users', |
|
76 | - // ], |
|
77 | - ], |
|
73 | + // 'users' => [ |
|
74 | + // 'driver' => 'database', |
|
75 | + // 'table' => 'users', |
|
76 | + // ], |
|
77 | + ], |
|
78 | 78 | |
79 | - /* |
|
79 | + /* |
|
80 | 80 | |-------------------------------------------------------------------------- |
81 | 81 | | Resetting Passwords |
82 | 82 | |-------------------------------------------------------------------------- |
@@ -91,12 +91,12 @@ discard block |
||
91 | 91 | | |
92 | 92 | */ |
93 | 93 | |
94 | - 'passwords' => [ |
|
95 | - 'users' => [ |
|
96 | - 'provider' => 'users', |
|
97 | - 'table' => 'password_resets', |
|
98 | - 'expire' => 60, |
|
99 | - ], |
|
100 | - ], |
|
94 | + 'passwords' => [ |
|
95 | + 'users' => [ |
|
96 | + 'provider' => 'users', |
|
97 | + 'table' => 'password_resets', |
|
98 | + 'expire' => 60, |
|
99 | + ], |
|
100 | + ], |
|
101 | 101 | |
102 | 102 | ]; |
@@ -7,81 +7,81 @@ |
||
7 | 7 | |
8 | 8 | class Handler extends ExceptionHandler |
9 | 9 | { |
10 | - /** |
|
11 | - * A list of the exception types that are not reported. |
|
12 | - * |
|
13 | - * @var array |
|
14 | - */ |
|
15 | - protected $dontReport = [ |
|
16 | - \League\OAuth2\Server\Exception\OAuthServerException::class, |
|
17 | - ]; |
|
10 | + /** |
|
11 | + * A list of the exception types that are not reported. |
|
12 | + * |
|
13 | + * @var array |
|
14 | + */ |
|
15 | + protected $dontReport = [ |
|
16 | + \League\OAuth2\Server\Exception\OAuthServerException::class, |
|
17 | + ]; |
|
18 | 18 | |
19 | - /** |
|
20 | - * A list of the inputs that are never flashed for validation exceptions. |
|
21 | - * |
|
22 | - * @var array |
|
23 | - */ |
|
24 | - protected $dontFlash = [ |
|
25 | - 'password', |
|
26 | - 'password_confirmation', |
|
27 | - ]; |
|
19 | + /** |
|
20 | + * A list of the inputs that are never flashed for validation exceptions. |
|
21 | + * |
|
22 | + * @var array |
|
23 | + */ |
|
24 | + protected $dontFlash = [ |
|
25 | + 'password', |
|
26 | + 'password_confirmation', |
|
27 | + ]; |
|
28 | 28 | |
29 | - /** |
|
30 | - * Report or log an exception. |
|
31 | - * |
|
32 | - * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
|
33 | - * |
|
34 | - * @param \Exception $exception |
|
35 | - * @return void |
|
36 | - */ |
|
37 | - public function report(Exception $exception) |
|
38 | - { |
|
39 | - parent::report($exception); |
|
40 | - } |
|
29 | + /** |
|
30 | + * Report or log an exception. |
|
31 | + * |
|
32 | + * This is a great spot to send exceptions to Sentry, Bugsnag, etc. |
|
33 | + * |
|
34 | + * @param \Exception $exception |
|
35 | + * @return void |
|
36 | + */ |
|
37 | + public function report(Exception $exception) |
|
38 | + { |
|
39 | + parent::report($exception); |
|
40 | + } |
|
41 | 41 | |
42 | - /** |
|
43 | - * Render an exception into an HTTP response. |
|
44 | - * |
|
45 | - * @param \Illuminate\Http\Request $request |
|
46 | - * @param \Exception $exception |
|
47 | - * @return \Illuminate\Http\Response |
|
48 | - */ |
|
49 | - public function render($request, Exception $exception) |
|
50 | - { |
|
51 | - if ($request->wantsJson()) |
|
52 | - { |
|
53 | - if ($exception instanceof \Illuminate\Auth\AuthenticationException) |
|
54 | - { |
|
55 | - \ErrorHandler::unAuthorized(); |
|
56 | - } |
|
57 | - if ($exception instanceof \Illuminate\Database\QueryException) |
|
58 | - { |
|
59 | - \ErrorHandler::dbQueryError(); |
|
60 | - } |
|
61 | - else if ($exception instanceof \predis\connection\connectionexception) |
|
62 | - { |
|
63 | - \ErrorHandler::redisNotRunning(); |
|
64 | - } |
|
65 | - else if ($exception instanceof \GuzzleHttp\Exception\ClientException) |
|
66 | - { |
|
67 | - \ErrorHandler::connectionError(); |
|
68 | - } |
|
69 | - else if ($exception instanceof \Symfony\Component\HttpKernel\Exception\HttpException) |
|
70 | - { |
|
71 | - return \Response::json($exception->getMessage(), $exception->getStatusCode()); |
|
72 | - } |
|
73 | - else if ($exception instanceof \Illuminate\Validation\ValidationException) |
|
74 | - { |
|
75 | - return \Response::json($exception->errors(), 422); |
|
76 | - } |
|
77 | - else if ( ! $exception instanceof \Symfony\Component\Debug\Exception\FatalErrorException) |
|
78 | - { |
|
79 | - return parent::render($request, $exception); |
|
80 | - } |
|
81 | - } |
|
82 | - else |
|
83 | - { |
|
84 | - return parent::render($request, $exception); |
|
85 | - } |
|
86 | - } |
|
42 | + /** |
|
43 | + * Render an exception into an HTTP response. |
|
44 | + * |
|
45 | + * @param \Illuminate\Http\Request $request |
|
46 | + * @param \Exception $exception |
|
47 | + * @return \Illuminate\Http\Response |
|
48 | + */ |
|
49 | + public function render($request, Exception $exception) |
|
50 | + { |
|
51 | + if ($request->wantsJson()) |
|
52 | + { |
|
53 | + if ($exception instanceof \Illuminate\Auth\AuthenticationException) |
|
54 | + { |
|
55 | + \ErrorHandler::unAuthorized(); |
|
56 | + } |
|
57 | + if ($exception instanceof \Illuminate\Database\QueryException) |
|
58 | + { |
|
59 | + \ErrorHandler::dbQueryError(); |
|
60 | + } |
|
61 | + else if ($exception instanceof \predis\connection\connectionexception) |
|
62 | + { |
|
63 | + \ErrorHandler::redisNotRunning(); |
|
64 | + } |
|
65 | + else if ($exception instanceof \GuzzleHttp\Exception\ClientException) |
|
66 | + { |
|
67 | + \ErrorHandler::connectionError(); |
|
68 | + } |
|
69 | + else if ($exception instanceof \Symfony\Component\HttpKernel\Exception\HttpException) |
|
70 | + { |
|
71 | + return \Response::json($exception->getMessage(), $exception->getStatusCode()); |
|
72 | + } |
|
73 | + else if ($exception instanceof \Illuminate\Validation\ValidationException) |
|
74 | + { |
|
75 | + return \Response::json($exception->errors(), 422); |
|
76 | + } |
|
77 | + else if ( ! $exception instanceof \Symfony\Component\Debug\Exception\FatalErrorException) |
|
78 | + { |
|
79 | + return parent::render($request, $exception); |
|
80 | + } |
|
81 | + } |
|
82 | + else |
|
83 | + { |
|
84 | + return parent::render($request, $exception); |
|
85 | + } |
|
86 | + } |
|
87 | 87 | } |
@@ -7,15 +7,15 @@ |
||
7 | 7 | |
8 | 8 | class BroadcastServiceProvider extends ServiceProvider |
9 | 9 | { |
10 | - /** |
|
11 | - * Bootstrap any application services. |
|
12 | - * |
|
13 | - * @return void |
|
14 | - */ |
|
15 | - public function boot() |
|
16 | - { |
|
17 | - Broadcast::routes(['middleware' => ['auth:api']]); |
|
10 | + /** |
|
11 | + * Bootstrap any application services. |
|
12 | + * |
|
13 | + * @return void |
|
14 | + */ |
|
15 | + public function boot() |
|
16 | + { |
|
17 | + Broadcast::routes(['middleware' => ['auth:api']]); |
|
18 | 18 | |
19 | - require base_path('routes/channels.php'); |
|
20 | - } |
|
19 | + require base_path('routes/channels.php'); |
|
20 | + } |
|
21 | 21 | } |
@@ -9,38 +9,38 @@ |
||
9 | 9 | |
10 | 10 | class Kernel extends ConsoleKernel |
11 | 11 | { |
12 | - /** |
|
13 | - * The Artisan commands provided by your application. |
|
14 | - * |
|
15 | - * @var array |
|
16 | - */ |
|
17 | - protected $commands = [ |
|
18 | - GenerateDoc::class, |
|
19 | - MakeNotificationsCommand::class, |
|
20 | - UpdateTeachersWorkingHoursCommand::class |
|
21 | - ]; |
|
12 | + /** |
|
13 | + * The Artisan commands provided by your application. |
|
14 | + * |
|
15 | + * @var array |
|
16 | + */ |
|
17 | + protected $commands = [ |
|
18 | + GenerateDoc::class, |
|
19 | + MakeNotificationsCommand::class, |
|
20 | + UpdateTeachersWorkingHoursCommand::class |
|
21 | + ]; |
|
22 | 22 | |
23 | - /** |
|
24 | - * Define the application's command schedule. |
|
25 | - * |
|
26 | - * @param \Illuminate\Console\Scheduling\Schedule $schedule |
|
27 | - * @return void |
|
28 | - */ |
|
29 | - protected function schedule(Schedule $schedule) |
|
30 | - { |
|
31 | - // $schedule->command('inspire') |
|
32 | - // ->hourly(); |
|
33 | - } |
|
23 | + /** |
|
24 | + * Define the application's command schedule. |
|
25 | + * |
|
26 | + * @param \Illuminate\Console\Scheduling\Schedule $schedule |
|
27 | + * @return void |
|
28 | + */ |
|
29 | + protected function schedule(Schedule $schedule) |
|
30 | + { |
|
31 | + // $schedule->command('inspire') |
|
32 | + // ->hourly(); |
|
33 | + } |
|
34 | 34 | |
35 | - /** |
|
36 | - * Register the commands for the application. |
|
37 | - * |
|
38 | - * @return void |
|
39 | - */ |
|
40 | - protected function commands() |
|
41 | - { |
|
42 | - $this->load(__DIR__.'/Commands'); |
|
35 | + /** |
|
36 | + * Register the commands for the application. |
|
37 | + * |
|
38 | + * @return void |
|
39 | + */ |
|
40 | + protected function commands() |
|
41 | + { |
|
42 | + $this->load(__DIR__.'/Commands'); |
|
43 | 43 | |
44 | - require base_path('routes/console.php'); |
|
45 | - } |
|
44 | + require base_path('routes/console.php'); |
|
45 | + } |
|
46 | 46 | } |
@@ -10,41 +10,41 @@ |
||
10 | 10 | |
11 | 11 | class ConfirmEmail extends Notification implements ShouldQueue |
12 | 12 | { |
13 | - use Queueable; |
|
13 | + use Queueable; |
|
14 | 14 | |
15 | - /** |
|
16 | - * Create a new notification instance. |
|
17 | - * |
|
18 | - * @return void |
|
19 | - */ |
|
20 | - public function __construct() |
|
21 | - { |
|
22 | - // |
|
23 | - } |
|
15 | + /** |
|
16 | + * Create a new notification instance. |
|
17 | + * |
|
18 | + * @return void |
|
19 | + */ |
|
20 | + public function __construct() |
|
21 | + { |
|
22 | + // |
|
23 | + } |
|
24 | 24 | |
25 | - /** |
|
26 | - * Get the notification's delivery channels. |
|
27 | - * |
|
28 | - * @param mixed $notifiable |
|
29 | - * @return array |
|
30 | - */ |
|
31 | - public function via($notifiable) |
|
32 | - { |
|
33 | - return ['mail']; |
|
34 | - } |
|
25 | + /** |
|
26 | + * Get the notification's delivery channels. |
|
27 | + * |
|
28 | + * @param mixed $notifiable |
|
29 | + * @return array |
|
30 | + */ |
|
31 | + public function via($notifiable) |
|
32 | + { |
|
33 | + return ['mail']; |
|
34 | + } |
|
35 | 35 | |
36 | - /** |
|
37 | - * Get the mail representation of the notification. |
|
38 | - * |
|
39 | - * @param mixed $notifiable |
|
40 | - * @return \Illuminate\Notifications\Messages\MailMessage |
|
41 | - */ |
|
42 | - public function toMail($notifiable) |
|
43 | - { |
|
44 | - return (new MailMessage) |
|
45 | - ->subject('Email verification') |
|
46 | - ->line('Email verification') |
|
47 | - ->line('To validate your email click on the button below') |
|
48 | - ->action('Verify your email', config('confrim_email_url') . '/' . $notifiable->confirmation_code); |
|
49 | - } |
|
36 | + /** |
|
37 | + * Get the mail representation of the notification. |
|
38 | + * |
|
39 | + * @param mixed $notifiable |
|
40 | + * @return \Illuminate\Notifications\Messages\MailMessage |
|
41 | + */ |
|
42 | + public function toMail($notifiable) |
|
43 | + { |
|
44 | + return (new MailMessage) |
|
45 | + ->subject('Email verification') |
|
46 | + ->line('Email verification') |
|
47 | + ->line('To validate your email click on the button below') |
|
48 | + ->action('Verify your email', config('confrim_email_url') . '/' . $notifiable->confirmation_code); |
|
49 | + } |
|
50 | 50 | } |
51 | 51 | \ No newline at end of file |
@@ -6,35 +6,35 @@ |
||
6 | 6 | |
7 | 7 | class ApiSkeletonServiceProvider extends ServiceProvider |
8 | 8 | { |
9 | - /** |
|
10 | - * Perform post-registration booting of services. |
|
11 | - * |
|
12 | - * @return void |
|
13 | - */ |
|
14 | - public function boot() |
|
15 | - { |
|
16 | - $this->publishes([ |
|
17 | - __DIR__.'/Modules' => app_path('Modules'), |
|
18 | - __DIR__.'/../lang' => base_path('resources/lang'), |
|
19 | - __DIR__.'/../files/Handler.php' => app_path('Exceptions/Handler.php'), |
|
20 | - __DIR__.'/../files/AuthServiceProvider.php' => app_path('Providers/AuthServiceProvider.php'), |
|
21 | - __DIR__.'/../files/BroadcastServiceProvider.php' => app_path('Providers/BroadcastServiceProvider.php'), |
|
22 | - __DIR__.'/../files/Kernel.php' => app_path('Console/Kernel.php'), |
|
23 | - ]); |
|
9 | + /** |
|
10 | + * Perform post-registration booting of services. |
|
11 | + * |
|
12 | + * @return void |
|
13 | + */ |
|
14 | + public function boot() |
|
15 | + { |
|
16 | + $this->publishes([ |
|
17 | + __DIR__.'/Modules' => app_path('Modules'), |
|
18 | + __DIR__.'/../lang' => base_path('resources/lang'), |
|
19 | + __DIR__.'/../files/Handler.php' => app_path('Exceptions/Handler.php'), |
|
20 | + __DIR__.'/../files/AuthServiceProvider.php' => app_path('Providers/AuthServiceProvider.php'), |
|
21 | + __DIR__.'/../files/BroadcastServiceProvider.php' => app_path('Providers/BroadcastServiceProvider.php'), |
|
22 | + __DIR__.'/../files/Kernel.php' => app_path('Console/Kernel.php'), |
|
23 | + ]); |
|
24 | 24 | |
25 | - $this->publishes([ |
|
26 | - __DIR__.'/../config/skeleton.php' => config_path('skeleton.php'), |
|
27 | - __DIR__.'/../files/auth.php' => config_path('auth.php'), |
|
28 | - ], 'config'); |
|
29 | - } |
|
25 | + $this->publishes([ |
|
26 | + __DIR__.'/../config/skeleton.php' => config_path('skeleton.php'), |
|
27 | + __DIR__.'/../files/auth.php' => config_path('auth.php'), |
|
28 | + ], 'config'); |
|
29 | + } |
|
30 | 30 | |
31 | - /** |
|
32 | - * Register any package services. |
|
33 | - * |
|
34 | - * @return void |
|
35 | - */ |
|
36 | - public function register() |
|
37 | - { |
|
38 | - // |
|
39 | - } |
|
31 | + /** |
|
32 | + * Register any package services. |
|
33 | + * |
|
34 | + * @return void |
|
35 | + */ |
|
36 | + public function register() |
|
37 | + { |
|
38 | + // |
|
39 | + } |
|
40 | 40 | } |
41 | 41 | \ No newline at end of file |