File tree 15 files changed +226
-113
lines changed
15 files changed +226
-113
lines changed File renamed without changes.
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Console \Command ;
4
+ use Symfony \Component \Console \Input \InputOption ;
5
+ use Symfony \Component \Console \Input \InputArgument ;
6
+
7
+ class InspireCommand extends Command {
8
+
9
+ /**
10
+ * The console command name.
11
+ *
12
+ * @var string
13
+ */
14
+ protected $ name = 'inspire ' ;
15
+
16
+ /**
17
+ * The console command description.
18
+ *
19
+ * @var string
20
+ */
21
+ protected $ description = 'Display an inpiring quote.. ' ;
22
+
23
+ /**
24
+ * Create a new command instance.
25
+ *
26
+ * @return void
27
+ */
28
+ public function __construct ()
29
+ {
30
+ parent ::__construct ();
31
+ }
32
+
33
+ /**
34
+ * Execute the console command.
35
+ *
36
+ * @return mixed
37
+ */
38
+ public function fire ()
39
+ {
40
+ $ this ->comment ('Inspiring Quote Here. ' );
41
+ }
42
+
43
+ }
Original file line number Diff line number Diff line change 95
95
96
96
'providers ' => array (
97
97
98
+ 'AppServiceProvider ' ,
99
+ 'ArtisanServiceProvider ' ,
100
+ 'ErrorServiceProvider ' ,
101
+ 'LogServiceProvider ' ,
102
+
98
103
'Illuminate\Foundation\Providers\ArtisanServiceProvider ' ,
99
104
'Illuminate\Auth\AuthServiceProvider ' ,
100
105
'Illuminate\Cache\CacheServiceProvider ' ,
Original file line number Diff line number Diff line change 13
13
14
14
App::before (function ($ request )
15
15
{
16
- //
16
+ if (App::isDownForMaintenance ())
17
+ {
18
+ return Response::make ('Be right back! ' );
19
+ }
17
20
});
18
21
19
22
Original file line number Diff line number Diff line change 1
1
<?php
2
2
3
+ /*
4
+ |--------------------------------------------------------------------------
5
+ | Require The Filters File
6
+ |--------------------------------------------------------------------------
7
+ |
8
+ | Next we will load the filters file for the application. This gives us
9
+ | a nice separate location to store our route and application filter
10
+ | definitions instead of putting them all in the main routes file.
11
+ |
12
+ */
13
+
14
+ require __DIR__ .'/filters.php ' ;
15
+
3
16
/*
4
17
|--------------------------------------------------------------------------
5
18
| Application Routes
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Support \ServiceProvider ;
4
+
5
+ class AppServiceProvider extends ServiceProvider {
6
+
7
+ /**
8
+ * Bootstrap the application events.
9
+ *
10
+ * @return void
11
+ */
12
+ public function boot ()
13
+ {
14
+ //
15
+ }
16
+
17
+ /**
18
+ * Register the service provider.
19
+ *
20
+ * @return void
21
+ */
22
+ public function register ()
23
+ {
24
+ //
25
+ }
26
+
27
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Support \ServiceProvider ;
4
+
5
+ class ArtisanServiceProvider extends ServiceProvider {
6
+
7
+ /**
8
+ * Bootstrap the application events.
9
+ *
10
+ * @return void
11
+ */
12
+ public function boot ()
13
+ {
14
+ //
15
+ }
16
+
17
+ /**
18
+ * Register the service provider.
19
+ *
20
+ * @return void
21
+ */
22
+ public function register ()
23
+ {
24
+ $ this ->registerInspireCommand ();
25
+
26
+ $ this ->commands ('commands.inspire ' );
27
+ }
28
+
29
+ /**
30
+ * Register the Inspire Artisan command.
31
+ *
32
+ * @return void
33
+ */
34
+ protected function registerInspireCommand ()
35
+ {
36
+ // Each available Artisan command must be registered with the console so
37
+ // that it is available to be called. We'll register every command so
38
+ // the console gets access to each of the command object instances.
39
+ $ this ->app ->bindShared ('commands.inspire ' , function ()
40
+ {
41
+ return new InspireCommand ;
42
+ });
43
+ }
44
+
45
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Support \ServiceProvider ;
4
+
5
+ class ErrorServiceProvider extends ServiceProvider {
6
+
7
+ /**
8
+ * Bootstrap the application events.
9
+ *
10
+ * @return void
11
+ */
12
+ public function boot ()
13
+ {
14
+ $ this ->setupErrorHandlers ();
15
+ }
16
+
17
+ /**
18
+ * Register the service provider.
19
+ *
20
+ * @return void
21
+ */
22
+ public function register ()
23
+ {
24
+ //
25
+ }
26
+
27
+ /**
28
+ * Setup the error handlers for the application.
29
+ *
30
+ * @return void
31
+ */
32
+ protected function setupErrorHandlers ()
33
+ {
34
+ // Here you may handle any errors that occur in your application, including
35
+ // logging them or displaying custom views for specific errors. You may
36
+ // even register several error handlers to handle different types of
37
+ // exceptions. If nothing is returned, the default error view is
38
+ // shown, which includes a detailed stack trace during debug.
39
+
40
+ $ this ->app ->error (function (Exception $ exception , $ code )
41
+ {
42
+ Log::error ($ exception );
43
+ });
44
+ }
45
+
46
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ use Illuminate \Support \ServiceProvider ;
4
+
5
+ class LogServiceProvider extends ServiceProvider {
6
+
7
+ /**
8
+ * Bootstrap the application events.
9
+ *
10
+ * @return void
11
+ */
12
+ public function boot ()
13
+ {
14
+ $ this ->setupLogging ();
15
+ }
16
+
17
+ /**
18
+ * Register the service provider.
19
+ *
20
+ * @return void
21
+ */
22
+ public function register ()
23
+ {
24
+ //
25
+ }
26
+
27
+ /**
28
+ * Setup the logging facilities for the application.
29
+ *
30
+ * @return void
31
+ */
32
+ protected function setupLogging ()
33
+ {
34
+ // Here we will configure the error logger setup for the application which
35
+ // is built on top of the wonderful Monolog library. By default we will
36
+ // build a basic log file setup which creates a single file for logs.
37
+
38
+ Log::useFiles (storage_path ().'/logs/laravel.log ' );
39
+ }
40
+
41
+ }
File renamed without changes.
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 32
32
require $ compiled ;
33
33
}
34
34
35
- /*
36
- |--------------------------------------------------------------------------
37
- | Setup Patchwork UTF-8 Handling
38
- |--------------------------------------------------------------------------
39
- |
40
- | The Patchwork library provides solid handling of UTF-8 strings as well
41
- | as provides replacements for all mb_* and iconv type functions that
42
- | are not available by default in PHP. We'll setup this stuff here.
43
- |
44
- */
45
-
46
- Patchwork \Utf8 \Bootup::initMbstring ();
47
-
48
35
/*
49
36
|--------------------------------------------------------------------------
50
37
| Register The Laravel Auto Loader
Original file line number Diff line number Diff line change 8
8
},
9
9
"autoload" : {
10
10
"classmap" : [
11
- " app/console " ,
11
+ " app/commands " ,
12
12
" app/controllers" ,
13
- " app/models" ,
14
13
" app/database/migrations" ,
15
14
" app/database/seeds" ,
15
+ " app/src" ,
16
16
" app/tests/TestCase.php"
17
17
]
18
18
},
You can’t perform that action at this time.
0 commit comments