Commit 9b005549 authored by Taylor Otwell's avatar Taylor Otwell

Merging structure branch.

parents f4e091ff c58286aa
<?php
use Illuminate\Console\Command;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class InspireCommand extends Command {
/**
* The console command name.
*
* @var string
*/
protected $name = 'inspire';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Display an inpiring quote..';
/**
* Create a new command instance.
*
* @return void
*/
public function __construct()
{
parent::__construct();
}
/**
* Execute the console command.
*
* @return mixed
*/
public function fire()
{
$this->comment('Inspiring Quote Here.');
}
}
...@@ -95,6 +95,17 @@ return array( ...@@ -95,6 +95,17 @@ return array(
'providers' => array( 'providers' => array(
/*
* Application Service Providers...
*/
'AppServiceProvider',
'ArtisanServiceProvider',
'ErrorServiceProvider',
'LogServiceProvider',
/*
* Laravel Framework Service Providers...
*/
'Illuminate\Foundation\Providers\ArtisanServiceProvider', 'Illuminate\Foundation\Providers\ArtisanServiceProvider',
'Illuminate\Auth\AuthServiceProvider', 'Illuminate\Auth\AuthServiceProvider',
'Illuminate\Cache\CacheServiceProvider', 'Illuminate\Cache\CacheServiceProvider',
...@@ -150,38 +161,37 @@ return array( ...@@ -150,38 +161,37 @@ return array(
'aliases' => array( 'aliases' => array(
'App' => 'Illuminate\Support\Facades\App', 'App' => 'Illuminate\Support\Facades\App',
'Artisan' => 'Illuminate\Support\Facades\Artisan', 'Artisan' => 'Illuminate\Support\Facades\Artisan',
'Auth' => 'Illuminate\Support\Facades\Auth', 'Auth' => 'Illuminate\Support\Facades\Auth',
'Blade' => 'Illuminate\Support\Facades\Blade', 'Blade' => 'Illuminate\Support\Facades\Blade',
'Cache' => 'Illuminate\Support\Facades\Cache', 'Cache' => 'Illuminate\Support\Facades\Cache',
'ClassLoader' => 'Illuminate\Support\ClassLoader', 'Config' => 'Illuminate\Support\Facades\Config',
'Config' => 'Illuminate\Support\Facades\Config', 'Controller' => 'Illuminate\Routing\Controller',
'Controller' => 'Illuminate\Routing\Controller', 'Cookie' => 'Illuminate\Support\Facades\Cookie',
'Cookie' => 'Illuminate\Support\Facades\Cookie', 'Crypt' => 'Illuminate\Support\Facades\Crypt',
'Crypt' => 'Illuminate\Support\Facades\Crypt', 'DB' => 'Illuminate\Support\Facades\DB',
'DB' => 'Illuminate\Support\Facades\DB', 'Eloquent' => 'Illuminate\Database\Eloquent\Model',
'Eloquent' => 'Illuminate\Database\Eloquent\Model', 'Event' => 'Illuminate\Support\Facades\Event',
'Event' => 'Illuminate\Support\Facades\Event', 'File' => 'Illuminate\Support\Facades\File',
'File' => 'Illuminate\Support\Facades\File', 'Form' => 'Illuminate\Support\Facades\Form',
'Form' => 'Illuminate\Support\Facades\Form', 'Hash' => 'Illuminate\Support\Facades\Hash',
'Hash' => 'Illuminate\Support\Facades\Hash', 'HTML' => 'Illuminate\Support\Facades\HTML',
'HTML' => 'Illuminate\Support\Facades\HTML', 'Input' => 'Illuminate\Support\Facades\Input',
'Input' => 'Illuminate\Support\Facades\Input', 'Lang' => 'Illuminate\Support\Facades\Lang',
'Lang' => 'Illuminate\Support\Facades\Lang', 'Log' => 'Illuminate\Support\Facades\Log',
'Log' => 'Illuminate\Support\Facades\Log', 'Mail' => 'Illuminate\Support\Facades\Mail',
'Mail' => 'Illuminate\Support\Facades\Mail', 'Paginator' => 'Illuminate\Support\Facades\Paginator',
'Paginator' => 'Illuminate\Support\Facades\Paginator', 'Password' => 'Illuminate\Support\Facades\Password',
'Password' => 'Illuminate\Support\Facades\Password', 'Queue' => 'Illuminate\Support\Facades\Queue',
'Queue' => 'Illuminate\Support\Facades\Queue', 'Redirect' => 'Illuminate\Support\Facades\Redirect',
'Redirect' => 'Illuminate\Support\Facades\Redirect', 'Redis' => 'Illuminate\Support\Facades\Redis',
'Redis' => 'Illuminate\Support\Facades\Redis', 'Request' => 'Illuminate\Support\Facades\Request',
'Request' => 'Illuminate\Support\Facades\Request', 'Response' => 'Illuminate\Support\Facades\Response',
'Response' => 'Illuminate\Support\Facades\Response', 'Route' => 'Illuminate\Support\Facades\Route',
'Route' => 'Illuminate\Support\Facades\Route', 'Schema' => 'Illuminate\Support\Facades\Schema',
'Schema' => 'Illuminate\Support\Facades\Schema', 'Seeder' => 'Illuminate\Database\Seeder',
'Seeder' => 'Illuminate\Database\Seeder', 'Session' => 'Illuminate\Support\Facades\Session',
'Session' => 'Illuminate\Support\Facades\Session',
'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait', 'SoftDeletingTrait' => 'Illuminate\Database\Eloquent\SoftDeletingTrait',
'SSH' => 'Illuminate\Support\Facades\SSH', 'SSH' => 'Illuminate\Support\Facades\SSH',
'Str' => 'Illuminate\Support\Str', 'Str' => 'Illuminate\Support\Str',
......
...@@ -13,6 +13,23 @@ return array( ...@@ -13,6 +13,23 @@ return array(
| |
*/ */
'files' => array(
//
),
/*
|--------------------------------------------------------------------------
| Compiled File Providers
|--------------------------------------------------------------------------
|
| Here you may list service providers which define a "compiles" function
| that returns additional files that should be compiled, providing an
| easy way to get common files from any packages you are utilizing.
|
*/
'providers' => array(
//
),
); );
...@@ -48,7 +48,7 @@ return array( ...@@ -48,7 +48,7 @@ return array(
'sqlite' => array( 'sqlite' => array(
'driver' => 'sqlite', 'driver' => 'sqlite',
'database' => __DIR__.'/../database/production.sqlite', 'database' => storage_path().'/database.sqlite',
'prefix' => '', 'prefix' => '',
), ),
......
...@@ -13,7 +13,10 @@ ...@@ -13,7 +13,10 @@
App::before(function($request) App::before(function($request)
{ {
// if (App::isDownForMaintenance())
{
return Response::make('Be right back!');
}
}); });
......
<?php <?php
/*
|--------------------------------------------------------------------------
| Require The Filters File
|--------------------------------------------------------------------------
|
| Next we will load the filters file for the application. This gives us
| a nice separate location to store our route and application filter
| definitions instead of putting them all in the main routes file.
|
*/
require __DIR__.'/filters.php';
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Routes | Application Routes
......
<?php
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider {
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
// This service provider is a convenient place to register your services
// in the IoC container. If you wish, you may make additional methods
// or service providers to keep the code more focused and granular.
//
}
}
\ No newline at end of file
<?php
use Illuminate\Support\ServiceProvider;
class ArtisanServiceProvider extends ServiceProvider {
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
//
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
$this->registerInspireCommand();
$this->commands('commands.inspire');
}
/**
* Register the Inspire Artisan command.
*
* @return void
*/
protected function registerInspireCommand()
{
// Each available Artisan command must be registered with the console so
// that it is available to be called. We'll register every command so
// the console gets access to each of the command object instances.
$this->app->bindShared('commands.inspire', function()
{
return new InspireCommand;
});
}
}
\ No newline at end of file
<?php
use Illuminate\Support\ServiceProvider;
class ErrorServiceProvider extends ServiceProvider {
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->setupErrorHandlers();
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
//
}
/**
* Setup the error handlers for the application.
*
* @return void
*/
protected function setupErrorHandlers()
{
// Here you may handle any errors that occur in your application, including
// logging them or displaying custom views for specific errors. You may
// even register several error handlers to handle different types of
// exceptions. If nothing is returned, the default error view is
// shown, which includes a detailed stack trace during debug.
$this->app->error(function(Exception $exception, $code)
{
Log::error($exception);
});
}
}
\ No newline at end of file
<?php
use Illuminate\Support\ServiceProvider;
class LogServiceProvider extends ServiceProvider {
/**
* Bootstrap the application events.
*
* @return void
*/
public function boot()
{
$this->setupLogging();
}
/**
* Register the service provider.
*
* @return void
*/
public function register()
{
//
}
/**
* Setup the logging facilities for the application.
*
* @return void
*/
protected function setupLogging()
{
// Here we will configure the error logger setup for the application which
// is built on top of the wonderful Monolog library. By default we will
// build a basic log file setup which creates a single file for logs.
Log::useFiles(storage_path().'/logs/laravel.log');
}
}
\ No newline at end of file
<?php
/*
|--------------------------------------------------------------------------
| Register The Laravel Class Loader
|--------------------------------------------------------------------------
|
| In addition to using Composer, you may use the Laravel class loader to
| load your controllers and models. This is useful for keeping all of
| your classes in the "global" namespace without Composer updating.
|
*/
ClassLoader::addDirectories(array(
app_path().'/commands',
app_path().'/controllers',
app_path().'/models',
app_path().'/database/seeds',
));
/*
|--------------------------------------------------------------------------
| Application Error Logger
|--------------------------------------------------------------------------
|
| Here we will configure the error logger setup for the application which
| is built on top of the wonderful Monolog library. By default we will
| build a basic log file setup which creates a single file for logs.
|
*/
Log::useFiles(storage_path().'/logs/laravel.log');
/*
|--------------------------------------------------------------------------
| Application Error Handler
|--------------------------------------------------------------------------
|
| Here you may handle any errors that occur in your application, including
| logging them or displaying custom views for specific errors. You may
| even register several error handlers to handle different types of
| exceptions. If nothing is returned, the default error view is
| shown, which includes a detailed stack trace during debug.
|
*/
App::error(function(Exception $exception, $code)
{
Log::error($exception);
});
/*
|--------------------------------------------------------------------------
| Maintenance Mode Handler
|--------------------------------------------------------------------------
|
| The "down" Artisan command gives you the ability to put an application
| into maintenance mode. Here, you will define what is displayed back
| to the user if maintenance mode is in effect for the application.
|
*/
App::down(function()
{
return Response::make("Be right back!", 503);
});
/*
|--------------------------------------------------------------------------
| Require The Filters File
|--------------------------------------------------------------------------
|
| Next we will load the filters file for the application. This gives us
| a nice separate location to store our route and application filter
| definitions instead of putting them all in the main routes file.
|
*/
require app_path().'/filters.php';
<?php
//
\ No newline at end of file
...@@ -32,32 +32,6 @@ if (file_exists($compiled = __DIR__.'/compiled.php')) ...@@ -32,32 +32,6 @@ if (file_exists($compiled = __DIR__.'/compiled.php'))
require $compiled; require $compiled;
} }
/*
|--------------------------------------------------------------------------
| Setup Patchwork UTF-8 Handling
|--------------------------------------------------------------------------
|
| The Patchwork library provides solid handling of UTF-8 strings as well
| as provides replacements for all mb_* and iconv type functions that
| are not available by default in PHP. We'll setup this stuff here.
|
*/
Patchwork\Utf8\Bootup::initMbstring();
/*
|--------------------------------------------------------------------------
| Register The Laravel Auto Loader
|--------------------------------------------------------------------------
|
| We register an auto-loader "behind" the Composer loader that can load
| model classes on the fly, even if the autoload files have not been
| regenerated for the application. We'll add it to the stack here.
|
*/
Illuminate\Support\ClassLoader::register();
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Register The Workbench Loaders | Register The Workbench Loaders
......
...@@ -2,12 +2,17 @@ ...@@ -2,12 +2,17 @@
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Register The Artisan Commands | Detect The Application Environment
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Each available Artisan command must be registered with the console so | Laravel takes a dead simple approach to your application environments
| that it is available to be called. We'll register every command so | so you can just specify a machine name for the host that matches a
| the console gets access to each of the command object instances. | given environment, then we will automatically detect it for you.
| |
*/ */
$env = $app->detectEnvironment([
'local' => ['homestead'],
]);
...@@ -52,6 +52,6 @@ return array( ...@@ -52,6 +52,6 @@ return array(
| |
*/ */
'storage' => __DIR__.'/../app/storage', 'storage' => __DIR__.'/../storage',
); );
...@@ -24,11 +24,7 @@ $app = new Illuminate\Foundation\Application; ...@@ -24,11 +24,7 @@ $app = new Illuminate\Foundation\Application;
| |
*/ */
$env = $app->detectEnvironment(array( require __DIR__.'/environment.php';
'local' => array('homestead'),
));
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
"keywords": ["framework", "laravel"], "keywords": ["framework", "laravel"],
"license": "MIT", "license": "MIT",
"require": { "require": {
"laravel/framework": "4.2.*" "laravel/framework": "4.3.*"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [
"app/commands", "app/commands",
"app/controllers", "app/controllers",
"app/models",
"app/database/migrations", "app/database/migrations",
"app/database/seeds", "app/database/seeds",
"app/src",
"app/tests/TestCase.php" "app/tests/TestCase.php"
] ]
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment