8000 Update for optimize command. · hicode/laravel@13d7adb · GitHub
[go: up one dir, main page]

Skip to content

Commit 13d7adb

Browse files
committed
Update for optimize command.
1 parent 0c0b68e commit 13d7adb

File tree

4 files changed

+37
-0
lines changed

4 files changed

+37
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/bootstrap/compiled.php
12
/vendor
23
composer.phar
34
composer.lock

app/config/app.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
'Illuminate\Log\LogServiceProvider',
9898
'Illuminate\Mail\MailServiceProvider',
9999
'Illuminate\Database\MigrationServiceProvider',
100+
'Illuminate\Foundation\Providers\OptimizeServiceProvider',
100101
'Illuminate\Pagination\PaginationServiceProvider',
101102
'Illuminate\Foundation\Providers\PublisherServiceProvider',
102103
'Illuminate\Queue\QueueServiceProvider',

app/config/compile.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?php
2+
3+
return array(
4+
5+
/*
6+
|--------------------------------------------------------------------------
7+
| Additional Compiled Classes
8+
|--------------------------------------------------------------------------
9+
|
10+
| Here you may specify additional classes to include in the compiled file
11+
| generated by the `artisan optimize` command. These should be classes
12+
| that are included on basically every request into the application.
13+
|
14+
*/
15+
16+
17+
18+
);

bootstrap/autoload.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,23 @@
1414

1515
require __DIR__.'/../vendor/autoload.php';
1616

17+
/*
18+
|--------------------------------------------------------------------------
19+
| Register The Composer Auto Loader
20+
|--------------------------------------------------------------------------
21+
|
22+
| Composer provides a convenient, automatically generated class loader
23+
| for our application. We just need to utilize it! We'll require it
24+
| into the script here so that we do not have to worry about the
25+
| loading of any our classes "manually". Feels great to relax.
26+
|
27+
*/
28+
29+
if (file_exists($compiled = __DIR__.'/compiled.php'))
30+
{
31+
require $compiled;
32+
}
33+
1734
/*
1835
|--------------------------------------------------------------------------
1936
| Register The Laravel Auto Loader

0 commit comments

Comments
 (0)
0