This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

l5

  • Loading branch information...
jung35 committed Feb 6, 2015
1 parent a66665a commit 2d3c63888bc161d8463c4da465088cdba8841c42
Showing with 19,854 additions and 0 deletions.
  1. +11 −0 .env.example
  2. +1 −0 .gitattributes
  3. +3 −0 .gitignore
  4. +7 −0 app/Commands/Command.php
  5. +34 −0 app/Console/Commands/Inspire.php
  6. +29 −0 app/Console/Kernel.php
  7. +7 −0 app/Events/Event.php
  8. +49 −0 app/Exceptions/Handler.php
  9. 0 app/Handlers/Commands/.gitkeep
  10. 0 app/Handlers/Events/.gitkeep
  11. +38 −0 app/Http/Controllers/Auth/AuthController.php
  12. +38 −0 app/Http/Controllers/Auth/PasswordController.php
  13. +11 −0 app/Http/Controllers/Controller.php
  14. +36 −0 app/Http/Controllers/HomeController.php
  15. +36 −0 app/Http/Controllers/WelcomeController.php
  16. +32 −0 app/Http/Kernel.php
  17. +50 −0 app/Http/Middleware/Authenticate.php
  18. +44 −0 app/Http/Middleware/RedirectIfAuthenticated.php
  19. +20 −0 app/Http/Middleware/VerifyCsrfToken.php
  20. +9 −0 app/Http/Requests/Request.php
  21. +21 −0 app/Http/routes.php
  22. +34 −0 app/Providers/AppServiceProvider.php
  23. +34 −0 app/Providers/BusServiceProvider.php
  24. +23 −0 app/Providers/ConfigServiceProvider.php
  25. +32 −0 app/Providers/EventServiceProvider.php
  26. +44 −0 app/Providers/RouteServiceProvider.php
  27. +39 −0 app/Services/Registrar.php
  28. +34 −0 app/User.php
  29. +51 −0 artisan
  30. +55 −0 bootstrap/app.php
  31. +35 −0 bootstrap/autoload.php
  32. +44 −0 composer.json
  33. +2,800 −0 composer.lock
  34. +198 −0 config/app.php
  35. +67 −0 config/auth.php
  36. +79 −0 config/cache.php
  37. +41 −0 config/compile.php
  38. +125 −0 config/database.php
  39. +70 −0 config/filesystems.php
  40. +124 −0 config/mail.php
  41. +92 −0 config/queue.php
  42. +37 −0 config/services.php
  43. +153 −0 config/session.php
  44. +33 −0 config/view.php
  45. +1 −0 database/.gitignore
  46. 0 database/migrations/.gitkeep
  47. +36 −0 database/migrations/2014_10_12_000000_create_users_table.php
  48. +33 −0 database/migrations/2014_10_12_100000_create_password_resets_table.php
  49. 0 database/seeds/.gitkeep
  50. +20 −0 database/seeds/DatabaseSeeder.php
  51. +16 −0 gulpfile.js
  52. +6 −0 package.json
  53. +5 −0 phpspec.yml
  54. +22 −0 phpunit.xml
  55. +15 −0 public/.htaccess
  56. +6,233 −0 public/css/app.css
  57. 0 public/favicon.ico
  58. +57 −0 public/index.php
  59. +2 −0 public/robots.txt
  60. +23 −0 readme.md
  61. +8 −0 resources/assets/less/app.less
  62. +68 −0 resources/assets/less/bootstrap/alerts.less
  63. +61 −0 resources/assets/less/bootstrap/badges.less
  64. +50 −0 resources/assets/less/bootstrap/bootstrap.less
  65. +26 −0 resources/assets/less/bootstrap/breadcrumbs.less
  66. +243 −0 resources/assets/less/bootstrap/button-groups.less
  67. +160 −0 resources/assets/less/bootstrap/buttons.less
  68. +267 −0 resources/assets/less/bootstrap/carousel.less
  69. +33 −0 resources/assets/less/bootstrap/close.less
  70. +69 −0 resources/assets/less/bootstrap/code.less
  71. +34 −0 resources/assets/less/bootstrap/component-animations.less
  72. +213 −0 resources/assets/less/bootstrap/dropdowns.less
  73. +546 −0 resources/assets/less/bootstrap/forms.less
  74. +234 −0 resources/assets/less/bootstrap/glyphicons.less
  75. +84 −0 resources/assets/less/bootstrap/grid.less
  76. +166 −0 resources/assets/less/bootstrap/input-groups.less
  77. +49 −0 resources/assets/less/bootstrap/jumbotron.less
  78. +64 −0 resources/assets/less/bootstrap/labels.less
  79. +124 −0 resources/assets/less/bootstrap/list-group.less
  80. +47 −0 resources/assets/less/bootstrap/media.less
  81. +39 −0 resources/assets/less/bootstrap/mixins.less
  82. +14 −0 resources/assets/less/bootstrap/mixins/alerts.less
  83. +8 −0 resources/assets/less/bootstrap/mixins/background-variant.less
  84. +18 −0 resources/assets/less/bootstrap/mixins/border-radius.less
  85. +52 −0 resources/assets/less/bootstrap/mixins/buttons.less
  86. +7 −0 resources/assets/less/bootstrap/mixins/center-block.less
  87. +22 −0 resources/assets/less/bootstrap/mixins/clearfix.less
  88. +85 −0 resources/assets/less/bootstrap/mixins/forms.less
  89. +59 −0 resources/assets/less/bootstrap/mixins/gradients.less
  90. +91 −0 resources/assets/less/bootstrap/mixins/grid-framework.less
  91. +122 −0 resources/assets/less/bootstrap/mixins/grid.less
  92. +21 −0 resources/assets/less/bootstrap/mixins/hide-text.less
  93. +33 −0 resources/assets/less/bootstrap/mixins/image.less
  94. +12 −0 resources/assets/less/bootstrap/mixins/labels.less
  95. +29 −0 resources/assets/less/bootstrap/mixins/list-group.less
  96. +10 −0 resources/assets/less/bootstrap/mixins/nav-divider.less
  97. +9 −0 resources/assets/less/bootstrap/mixins/nav-vertical-align.less
  98. +8 −0 resources/assets/less/bootstrap/mixins/opacity.less
  99. +23 −0 resources/assets/less/bootstrap/mixins/pagination.less
  100. +24 −0 resources/assets/less/bootstrap/mixins/panels.less
  101. +10 −0 resources/assets/less/bootstrap/mixins/progress-bar.less
  102. +8 −0 resources/assets/less/bootstrap/mixins/reset-filter.less
  103. +6 −0 resources/assets/less/bootstrap/mixins/resize.less
  104. +15 −0 resources/assets/less/bootstrap/mixins/responsive-visibility.less
  105. +10 −0 resources/assets/less/bootstrap/mixins/size.less
  106. +9 −0 resources/assets/less/bootstrap/mixins/tab-focus.less
  107. +28 −0 resources/assets/less/bootstrap/mixins/table-row.less
  108. +8 −0 resources/assets/less/bootstrap/mixins/text-emphasis.less
  109. +8 −0 resources/assets/less/bootstrap/mixins/text-overflow.less
  110. +227 −0 resources/assets/less/bootstrap/mixins/vendor-prefixes.less
  111. +148 −0 resources/assets/less/bootstrap/modals.less
  112. +660 −0 resources/assets/less/bootstrap/navbar.less
  113. +244 −0 resources/assets/less/bootstrap/navs.less
  114. +427 −0 resources/assets/less/bootstrap/normalize.less
  115. +54 −0 resources/assets/less/bootstrap/pager.less
  116. +88 −0 resources/assets/less/bootstrap/pagination.less
  117. +261 −0 resources/assets/less/bootstrap/panels.less
  118. +135 −0 resources/assets/less/bootstrap/popovers.less
  119. +107 −0 resources/assets/less/bootstrap/print.less
  120. +87 −0 resources/assets/less/bootstrap/progress-bars.less
  121. +35 −0 resources/assets/less/bootstrap/responsive-embed.less
  122. +194 −0 resources/assets/less/bootstrap/responsive-utilities.less
  123. +150 −0 resources/assets/less/bootstrap/scaffolding.less
  124. +234 −0 resources/assets/less/bootstrap/tables.less
  125. +272 −0 resources/assets/less/bootstrap/theme.less
  126. +36 −0 resources/assets/less/bootstrap/thumbnails.less
  127. +103 −0 resources/assets/less/bootstrap/tooltip.less
  128. +302 −0 resources/assets/less/bootstrap/type.less
  129. +56 −0 resources/assets/less/bootstrap/utilities.less
  130. +856 −0 resources/assets/less/bootstrap/variables.less
  131. +29 −0 resources/assets/less/bootstrap/wells.less
  132. +19 −0 resources/lang/en/pagination.php
  133. +22 −0 resources/lang/en/passwords.php
  134. +107 −0 resources/lang/en/validation.php
  135. +62 −0 resources/views/app.blade.php
  136. +63 −0 resources/views/auth/login.blade.php
  137. +50 −0 resources/views/auth/password.blade.php
  138. +65 −0 resources/views/auth/register.blade.php
  139. +59 −0 resources/views/auth/reset.blade.php
  140. +1 −0 resources/views/emails/password.blade.php
  141. +41 −0 resources/views/errors/503.blade.php
  142. +17 −0 resources/views/home.blade.php
  143. 0 resources/views/vendor/.gitkeep
  144. +46 −0 resources/views/welcome.blade.php
  145. +21 −0 server.php
  146. +1 −0 storage/.gitignore
  147. +2 −0 storage/app/.gitignore
  148. +6 −0 storage/framework/.gitignore
  149. +2 −0 storage/framework/cache/.gitignore
  150. +2 −0 storage/framework/sessions/.gitignore
  151. +2 −0 storage/framework/views/.gitignore
  152. +2 −0 storage/logs/.gitignore
  153. +17 −0 tests/ExampleTest.php
  154. +19 −0 tests/TestCase.php
View
@@ -0,0 +1,11 @@
APP_ENV=local
APP_DEBUG=true
APP_KEY=SomeRandomString
DB_HOST=localhost
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
CACHE_DRIVER=file
SESSION_DRIVER=file
View
@@ -0,0 +1 @@
* text=auto
View
@@ -0,0 +1,3 @@
/vendor
/node_modules
.env
View
@@ -0,0 +1,7 @@
<?php namespace App\Commands;
abstract class Command {
//
}
@@ -0,0 +1,34 @@
<?php namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring;
use Symfony\Component\Console\Input\InputOption;
use Symfony\Component\Console\Input\InputArgument;
class Inspire extends Command {
/**
* The console command name.
*
* @var string
*/
protected $name = 'inspire';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Display an inspiring quote';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
}
}
View
@@ -0,0 +1,29 @@
<?php namespace App\Console;
use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
class Kernel extends ConsoleKernel {
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
'App\Console\Commands\Inspire',
];
/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
$schedule->command('inspire')
->hourly();
}
}
View
@@ -0,0 +1,7 @@
<?php namespace App\Events;
abstract class Event {
//
}
View
@@ -0,0 +1,49 @@
<?php namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler {
/**
* A list of the exception types that should not be reported.
*
* @var array
*/
protected $dontReport = [
'Symfony\Component\HttpKernel\Exception\HttpException'
];
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $e
* @return void
*/
public function report(Exception $e)
{
return parent::report($e);
}
/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $e
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $e)
{
if ($this->isHttpException($e))
{
return $this->renderHttpException($e);
}
else
{
return parent::render($request, $e);
}
}
}
No changes.
No changes.
@@ -0,0 +1,38 @@
<?php namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\Registrar;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
class AuthController extends Controller {
/*
|--------------------------------------------------------------------------
| Registration & Login Controller
|--------------------------------------------------------------------------
|
| This controller handles the registration of new users, as well as the
| authentication of existing users. By default, this controller uses
| a simple trait to add these behaviors. Why don't you explore it?
|
*/
use AuthenticatesAndRegistersUsers;
/**
* Create a new authentication controller instance.
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\Registrar $registrar
* @return void
*/
public function __construct(Guard $auth, Registrar $registrar)
{
$this->auth = $auth;
$this->registrar = $registrar;
$this->middleware('guest', ['except' => 'getLogout']);
}
}
@@ -0,0 +1,38 @@
<?php namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Contracts\Auth\Guard;
use Illuminate\Contracts\Auth\PasswordBroker;
use Illuminate\Foundation\Auth\ResetsPasswords;
class PasswordController extends Controller {
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset requests
| and uses a simple trait to include this behavior. You're free to
| explore this trait and override any methods you wish to tweak.
|
*/
use ResetsPasswords;
/**
* Create a new password controller instance.
*
* @param \Illuminate\Contracts\Auth\Guard $auth
* @param \Illuminate\Contracts\Auth\PasswordBroker $passwords
* @return void
*/
public function __construct(Guard $auth, PasswordBroker $passwords)
{
$this->auth = $auth;
$this->passwords = $passwords;
$this->middleware('guest');
}
}
@@ -0,0 +1,11 @@
<?php namespace App\Http\Controllers;
use Illuminate\Foundation\Bus\DispatchesCommands;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
abstract class Controller extends BaseController {
use DispatchesCommands, ValidatesRequests;
}
@@ -0,0 +1,36 @@
<?php namespace App\Http\Controllers;
class HomeController extends Controller {
/*
|--------------------------------------------------------------------------
| Home Controller
|--------------------------------------------------------------------------
|
| This controller renders your application's "dashboard" for users that
| are authenticated. Of course, you are free to change or remove the
| controller as you wish. It is just here to get your app started!
|
*/
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('auth');
}
/**
* Show the application dashboard to the user.
*
* @return Response
*/
public function index()
{
return view('home');
}
}
@@ -0,0 +1,36 @@
<?php namespace App\Http\Controllers;
class WelcomeController extends Controller {
/*
|--------------------------------------------------------------------------
| Welcome Controller
|--------------------------------------------------------------------------
|
| This controller renders the "marketing page" for the application and
| is configured to only allow guests. Like most of the other sample
| controllers, you are free to modify or remove it as you desire.
|
*/
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
/**
* Show the application welcome screen to the user.
*
* @return Response
*/
public function index()
{
return view('welcome');
}
}
View
@@ -0,0 +1,32 @@
<?php namespace App\Http;
use Illuminate\Foundation\Http\Kernel as HttpKernel;
class Kernel extends HttpKernel {
/**
* The application's global HTTP middleware stack.
*
* @var array
*/
protected $middleware = [
'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode',
'Illuminate\Cookie\Middleware\EncryptCookies',
'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse',
'Illuminate\Session\Middleware\StartSession',
'Illuminate\View\Middleware\ShareErrorsFromSession',
'App\Http\Middleware\VerifyCsrfToken',
];
/**
* The application's route middleware.
*
* @var array
*/
protected $routeMiddleware = [
'auth' => 'App\Http\Middleware\Authenticate',
'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth',
'guest' => 'App\Http\Middleware\RedirectIfAuthenticated',
];
}
@@ -0,0 +1,50 @@
<?php namespace App\Http\Middleware;
use Closure;
use Illuminate\Contracts\Auth\Guard;
class Authenticate {
/**
* The Guard implementation.
*
* @var Guard
*/
protected $auth;
/**
* Create a new filter instance.
*
* @param Guard $auth
* @return void
*/
public function __construct(Guard $auth)
{
$this->auth = $auth;
}
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
if ($this->auth->guest())
{
if ($request->ajax())
{
return response('Unauthorized.', 401);
}
else
{
return redirect()->guest('auth/login');
}
}
return $next($request);
}
}
Oops, something went wrong.

0 comments on commit 2d3c638

Please sign in to comment.