Working on app structure.
This commit is contained in:
31
app/providers/AppServiceProvider.php
Normal file
31
app/providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php namespace Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* Bootstrap any necessary services.
|
||||
*
|
||||
* @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.
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
18
app/providers/ArtisanServiceProvider.php
Normal file
18
app/providers/ArtisanServiceProvider.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php namespace Providers;
|
||||
|
||||
use InspireCommand;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ArtisanServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->commands('InspireCommand');
|
||||
}
|
||||
|
||||
}
|
||||
36
app/providers/ErrorServiceProvider.php
Normal file
36
app/providers/ErrorServiceProvider.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php namespace Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class ErrorServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* Register any error handlers.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// 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)
|
||||
{
|
||||
$this->app['log']->error($exception);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
29
app/providers/EventServiceProvider.php
Normal file
29
app/providers/EventServiceProvider.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php namespace Providers;
|
||||
|
||||
use Illuminate\Foundation\Providers\EventServiceProvider as ServiceProvider;
|
||||
|
||||
class EventServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* Bootstrap the application events.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the directories to scan for events.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function scan()
|
||||
{
|
||||
return [
|
||||
app_path().'/src',
|
||||
];
|
||||
}
|
||||
|
||||
}
|
||||
37
app/providers/FilterServiceProvider.php
Normal file
37
app/providers/FilterServiceProvider.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php namespace Providers;
|
||||
|
||||
use Illuminate\Routing\FilterServiceProvider as ServiceProvider;
|
||||
|
||||
class FilterServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* The filters that should run before all requests.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $before = [
|
||||
'MaintenanceFilter',
|
||||
];
|
||||
|
||||
/**
|
||||
* The filters that should run after all requests.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $after = [
|
||||
//
|
||||
];
|
||||
|
||||
/**
|
||||
* All available route filters.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $filters = [
|
||||
'auth' => 'AuthFilter',
|
||||
'auth.basic' => 'BasicAuthFilter',
|
||||
'csrf' => 'CsrfFilter',
|
||||
'guest' => 'GuestFilter',
|
||||
];
|
||||
|
||||
}
|
||||
33
app/providers/LogServiceProvider.php
Normal file
33
app/providers/LogServiceProvider.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php namespace Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class LogServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* Configure the application's logging facilities.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
// 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.
|
||||
|
||||
$this->app['log']->useFiles(
|
||||
storage_path().'/logs/laravel.log'
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Register the service provider.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
}
|
||||
32
app/providers/RouteServiceProvider.php
Normal file
32
app/providers/RouteServiceProvider.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php namespace Providers;
|
||||
|
||||
use Illuminate\Routing\RouteServiceProvider as ServiceProvider;
|
||||
|
||||
class RouteServiceProvider extends ServiceProvider {
|
||||
|
||||
/**
|
||||
* Called before routes are registered.
|
||||
*
|
||||
* Register any model bindings or pattern based filters.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function before()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Define the routes for the application.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function map()
|
||||
{
|
||||
$this->app->booted(function()
|
||||
{
|
||||
require app('path').'/routes.php';
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user