Commit 177d1ebb authored by Taylor Otwell's avatar Taylor Otwell

Mega work on structure.

parent aae8ef30
<?php
<?php namespace App\Console;
use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring;
......
<?php
<?php namespace App\Http\Controllers;
class HomeController extends Controller {
class HomeController extends \Controller {
/*
|--------------------------------------------------------------------------
......@@ -17,7 +17,7 @@ class HomeController extends Controller {
public function index()
{
return View::make('hello');
return view('hello');
}
}
<?php
<?php namespace App\Http\Filters;
use Illuminate\Http\Request;
use Auth, Redirect, Response;
class AuthFilter {
......
<?php
<?php namespace App\Http\Filters;
use Auth;
class BasicAuthFilter {
......
<?php
<?php namespace App\Http\Filters;
use Session;
use Illuminate\Http\Request;
use Illuminate\Routing\Route;
use Illuminate\Session\TokenMismatchException;
class CsrfFilter {
......@@ -14,7 +16,7 @@ class CsrfFilter {
{
if (Session::token() != $request->input('_token'))
{
throw new Illuminate\Session\TokenMismatchException;
throw new TokenMismatchException;
}
}
......
<?php
<?php namespace App\Http\Filters;
use Auth, Redirect;
class GuestFilter {
......
<?php
<?php namespace App\Http\Filters;
use App, Response;
class MaintenanceFilter {
......
<?php namespace Providers;
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
......
<?php namespace Providers;
<?php namespace App\Providers;
use InspireCommand;
use Illuminate\Support\ServiceProvider;
......
<?php namespace Providers;
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
......
<?php namespace Providers;
<?php namespace App\Providers;
use Illuminate\Foundation\Providers\EventServiceProvider as ServiceProvider;
......
<?php namespace Providers;
<?php namespace App\Providers;
use Illuminate\Routing\FilterServiceProvider as ServiceProvider;
......@@ -10,7 +10,7 @@ class FilterServiceProvider extends ServiceProvider {
* @var array
*/
protected $before = [
'MaintenanceFilter',
'App\Http\Filters\MaintenanceFilter',
];
/**
......@@ -28,10 +28,10 @@ class FilterServiceProvider extends ServiceProvider {
* @var array
*/
protected $filters = [
'auth' => 'AuthFilter',
'auth.basic' => 'BasicAuthFilter',
'csrf' => 'CsrfFilter',
'guest' => 'GuestFilter',
'auth' => 'App\Http\Filters\AuthFilter',
'auth.basic' => 'App\Http\Filters\BasicAuthFilter',
'csrf' => 'App\Http\Filters\CsrfFilter',
'guest' => 'App\Http\Filters\GuestFilter',
];
}
\ No newline at end of file
<?php namespace Providers;
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
......
<?php namespace Providers;
<?php namespace App\Providers;
use Illuminate\Routing\RouteServiceProvider as ServiceProvider;
......@@ -25,7 +25,10 @@ class RouteServiceProvider extends ServiceProvider {
{
$this->app->booted(function()
{
require app('path').'/routes.php';
$this->namespaced(function()
{
require app('path').'/Http/routes.php';
});
});
}
......
......@@ -9,17 +9,11 @@
},
"autoload": {
"classmap": [
"app/Console",
"app/Http/Controllers",
"database",
"app/Http/Filters",
"app/Providers",
"app/Http/Requests",
"tests/TestCase.php"
],
"psr-4": {
"App\\": "app/Core/",
"Providers\\": "app/Providers/"
"App\\": "app/"
}
},
"scripts": {
......
......@@ -98,13 +98,13 @@ return array(
/*
* Application Service Providers...
*/
'Providers\AppServiceProvider',
'Providers\ArtisanServiceProvider',
'Providers\ErrorServiceProvider',
'Providers\EventServiceProvider',
'Providers\FilterServiceProvider',
'Providers\LogServiceProvider',
'Providers\RouteServiceProvider',
'App\Providers\AppServiceProvider',
'App\Providers\ArtisanServiceProvider',
'App\Providers\ErrorServiceProvider',
'App\Providers\EventServiceProvider',
'App\Providers\FilterServiceProvider',
'App\Providers\LogServiceProvider',
'App\Providers\RouteServiceProvider',
/*
* Laravel Framework Service Providers...
......
<?php
return array(
/*
|--------------------------------------------------------------------------
| Application Namespace
|--------------------------------------------------------------------------
|
| This is the root namespace used by the various Laravel generator tasks
| that are able to build controllers, console commands and many other
| classes for you. You may set the name via the "app:name" command.
|
*/
'root' => 'App\\',
/*
|--------------------------------------------------------------------------
| Root Controller Namespace
|--------------------------------------------------------------------------
|
| This namespace will be automatically prepended to URLs generated via
| the URL generator for controller actions, allowing for the simple
| and convenient referencing of your namespaced controller class.
|
*/
'controllers' => 'App\Http\Controllers',
);
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