Update for optimize command.

This commit is contained in:
Taylor Otwell 2013-03-15 22:22:11 -05:00
parent 0c0b68e395
commit 13d7adb38f
4 changed files with 37 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,3 +1,4 @@
/bootstrap/compiled.php
/vendor
composer.phar
composer.lock

View File

@ -97,6 +97,7 @@ return array(
'Illuminate\Log\LogServiceProvider',
'Illuminate\Mail\MailServiceProvider',
'Illuminate\Database\MigrationServiceProvider',
'Illuminate\Foundation\Providers\OptimizeServiceProvider',
'Illuminate\Pagination\PaginationServiceProvider',
'Illuminate\Foundation\Providers\PublisherServiceProvider',
'Illuminate\Queue\QueueServiceProvider',

18
app/config/compile.php Normal file
View File

@ -0,0 +1,18 @@
<?php
return array(
/*
|--------------------------------------------------------------------------
| Additional Compiled Classes
|--------------------------------------------------------------------------
|
| Here you may specify additional classes to include in the compiled file
| generated by the `artisan optimize` command. These should be classes
| that are included on basically every request into the application.
|
*/
);

View File

@ -14,6 +14,23 @@
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
if (file_exists($compiled = __DIR__.'/compiled.php'))
{
require $compiled;
}
/*
|--------------------------------------------------------------------------
| Register The Laravel Auto Loader