Permalink
Browse files

Streams distribution

  • Loading branch information...
0 parents commit e608eed73241e67317e13e5dde1e9fe51f8cb32c Osvaldo Brignoni committed Sep 3, 2014
Showing with 2,339 additions and 0 deletions.
  1. +1 −0 .gitattributes
  2. +8 −0 .gitignore
  3. +44 −0 app/Console/InspireCommand.php
  4. +25 −0 app/Http/Controllers/HomeController.php
  5. +29 −0 app/Http/Filters/AuthFilter.php
  6. +17 −0 app/Http/Filters/BasicAuthFilter.php
  7. +23 −0 app/Http/Filters/CsrfFilter.php
  8. +20 −0 app/Http/Filters/GuestFilter.php
  9. +20 −0 app/Http/Filters/MaintenanceFilter.php
  10. 0 app/Http/Requests/.gitkeep
  11. +14 −0 app/Http/routes.php
  12. +31 −0 app/Providers/AppServiceProvider.php
  13. +18 −0 app/Providers/ArtisanServiceProvider.php
  14. +37 −0 app/Providers/ErrorServiceProvider.php
  15. +37 −0 app/Providers/FilterServiceProvider.php
  16. +28 −0 app/Providers/LogServiceProvider.php
  17. +42 −0 app/Providers/RouteServiceProvider.php
  18. +27 −0 app/User.php
  19. +74 −0 artisan
  20. +51 −0 bootstrap/autoload.php
  21. +18 −0 bootstrap/environment.php
  22. +77 −0 bootstrap/paths.php
  23. +69 −0 bootstrap/start.php
  24. +39 −0 composer.json
  25. +211 −0 config/app.php
  26. +67 −0 config/auth.php
  27. +87 −0 config/cache.php
  28. +42 −0 config/compile.php
  29. +124 −0 config/database.php
  30. +69 −0 config/filesystems.php
  31. +18 −0 config/local/app.php
  32. +47 −0 config/local/database.php
  33. +124 −0 config/mail.php
  34. +39 −0 config/namespaces.php
  35. 0 config/packages/.gitkeep
  36. +83 −0 config/queue.php
  37. +31 −0 config/services.php
  38. +140 −0 config/session.php
  39. +20 −0 config/testing/cache.php
  40. +21 −0 config/testing/session.php
  41. +31 −0 config/view.php
  42. +31 −0 config/workbench.php
  43. +1 −0 database/.gitignore
  44. 0 database/migrations/.gitkeep
  45. 0 database/seeds/.gitkeep
  46. +19 −0 database/seeds/DatabaseSeeder.php
  47. +18 −0 phpunit.xml
  48. +15 −0 public/.htaccess
  49. 0 public/favicon.ico
  50. +49 −0 public/index.php
  51. 0 public/packages/.gitkeep
  52. +2 −0 public/robots.txt
  53. +25 −0 readme.md
  54. +20 −0 resources/lang/en/pagination.php
  55. +26 −0 resources/lang/en/reminders.php
  56. +107 −0 resources/lang/en/validation.php
  57. +14 −0 resources/views/emails/auth/reminder.blade.php
  58. +42 −0 resources/views/hello.php
  59. +19 −0 server.php
  60. +2 −0 storage/cache/.gitignore
  61. +2 −0 storage/logs/.gitignore
  62. +4 −0 storage/meta/.gitignore
  63. +2 −0 storage/sessions/.gitignore
  64. +2 −0 storage/views/.gitignore
  65. 0 storage/work/.gitkeep
  66. +17 −0 tests/ExampleTest.php
  67. +19 −0 tests/TestCase.php
  68. 0 workbench/.gitkeep
@@ -0,0 +1 @@
+* text=auto
@@ -0,0 +1,8 @@
+/vendor
+/.idea
+/workbench/*/
+composer.phar
+composer.lock
+.env.*
+.DS_Store
+Thumbs.db
@@ -0,0 +1,44 @@
+<?php namespace App\Console;
+
+use Illuminate\Console\Command;
+use Illuminate\Foundation\Inspiring;
+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(PHP_EOL.Inspiring::quote().PHP_EOL);
+ }
+
+}
@@ -0,0 +1,25 @@
+<?php namespace App\Http\Controllers;
+
+use Illuminate\Routing\Controller;
+
+class HomeController extends Controller {
+
+ /*
+ |--------------------------------------------------------------------------
+ | Default Home Controller
+ |--------------------------------------------------------------------------
+ |
+ | You may wish to use controllers instead of, or in addition to, Closure
+ | based routes. That's great! Here is an example controller method to
+ | get you started. To route to this controller, just add the route:
+ |
+ | Route::get('/', 'HomeController@index');
+ |
+ */
+
+ public function index()
+ {
+ return view('hello');
+ }
+
+}
@@ -0,0 +1,29 @@
+<?php namespace App\Http\Filters;
+
+use Illuminate\Http\Request;
+use Auth, Redirect, Response;
+
+class AuthFilter {
+
+ /**
+ * Run the request filter.
+ *
+ * @param \Illuminate\Http\Request $request
+ * @return mixed
+ */
+ public function filter(Request $request)
+ {
+ if (Auth::guest())
+ {
+ if ($request->ajax())
+ {
+ return Response::make('Unauthorized', 401);
+ }
+ else
+ {
+ return Redirect::guest('login');
+ }
+ }
+ }
+
+}
@@ -0,0 +1,17 @@
+<?php namespace App\Http\Filters;
+
+use Auth;
+
+class BasicAuthFilter {
+
+ /**
+ * Run the request filter.
+ *
+ * @return mixed
+ */
+ public function filter()
+ {
+ return Auth::basic();
+ }
+
+}
@@ -0,0 +1,23 @@
+<?php namespace App\Http\Filters;
+
+use Session;
+use Illuminate\Http\Request;
+use Illuminate\Routing\Route;
+use Illuminate\Session\TokenMismatchException;
+
+class CsrfFilter {
+
+ /**
+ * Run the request filter.
+ *
+ * @return mixed
+ */
+ public function filter(Route $route, Request $request)
+ {
+ if (Session::token() != $request->input('_token'))
+ {
+ throw new TokenMismatchException;
+ }
+ }
+
+}
@@ -0,0 +1,20 @@
+<?php namespace App\Http\Filters;
+
+use Auth, Redirect;
+
+class GuestFilter {
+
+ /**
+ * Run the request filter.
+ *
+ * @return mixed
+ */
+ public function filter()
+ {
+ if (Auth::check())
+ {
+ return Redirect::to('/');
+ }
+ }
+
+}
@@ -0,0 +1,20 @@
+<?php namespace App\Http\Filters;
+
+use App, Response;
+
+class MaintenanceFilter {
+
+ /**
+ * Run the request filter.
+ *
+ * @return mixed
+ */
+ public function filter()
+ {
+ if (App::isDownForMaintenance())
+ {
+ return Response::make('Be right back!');
+ }
+ }
+
+}
No changes.
@@ -0,0 +1,14 @@
+<?php
+
+/*
+|--------------------------------------------------------------------------
+| Application Routes
+|--------------------------------------------------------------------------
+|
+| Here is where you can register all of the routes for an application.
+| It's a breeze. Simply tell Laravel the URIs it should respond to
+| and give it the Closure to execute when that URI is requested.
+|
+*/
+
+Route::get('/', 'HomeController@index');
@@ -0,0 +1,31 @@
+<?php namespace App\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.
+
+ //
+ }
+
+}
@@ -0,0 +1,18 @@
+<?php namespace App\Providers;
+
+use InspireCommand;
+use Illuminate\Support\ServiceProvider;
+
+class ArtisanServiceProvider extends ServiceProvider {
+
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ $this->commands('App\Console\InspireCommand');
+ }
+
+}
@@ -0,0 +1,37 @@
+<?php namespace App\Providers;
+
+use App, Log, Exception;
+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.
+
+ App::error(function(Exception $e)
+ {
+ Log::error($e);
+ });
+ }
+
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ //
+ }
+
+}
@@ -0,0 +1,37 @@
+<?php namespace App\Providers;
+
+use Illuminate\Routing\FilterServiceProvider as ServiceProvider;
+
+class FilterServiceProvider extends ServiceProvider {
+
+ /**
+ * The filters that should run before all requests.
+ *
+ * @var array
+ */
+ protected $before = [
+ 'App\Http\Filters\MaintenanceFilter',
+ ];
+
+ /**
+ * The filters that should run after all requests.
+ *
+ * @var array
+ */
+ protected $after = [
+ //
+ ];
+
+ /**
+ * All available route filters.
+ *
+ * @var array
+ */
+ protected $filters = [
+ 'auth' => 'App\Http\Filters\AuthFilter',
+ 'auth.basic' => 'App\Http\Filters\BasicAuthFilter',
+ 'csrf' => 'App\Http\Filters\CsrfFilter',
+ 'guest' => 'App\Http\Filters\GuestFilter',
+ ];
+
+}
@@ -0,0 +1,28 @@
+<?php namespace App\Providers;
+
+use Log;
+use Illuminate\Support\ServiceProvider;
+
+class LogServiceProvider extends ServiceProvider {
+
+ /**
+ * Configure the application's logging facilities.
+ *
+ * @return void
+ */
+ public function boot()
+ {
+ Log::useFiles(storage_path().'/logs/laravel.log');
+ }
+
+ /**
+ * Register the service provider.
+ *
+ * @return void
+ */
+ public function register()
+ {
+ //
+ }
+
+}
Oops, something went wrong.

0 comments on commit e608eed

Please sign in to comment.