├── .bowerrc ├── .coveralls.yml ├── .env.example ├── .gitattributes ├── .gitignore ├── .scrutinizer.yml ├── .travis.yml ├── README.md ├── app ├── Commands │ ├── Command.php │ └── MarkdownCommand.php ├── Console │ ├── Commands │ │ └── .gitkeep │ └── Kernel.php ├── Events │ ├── Event.php │ └── ToDoEvent.php ├── Exceptions │ └── Handler.php ├── Handlers │ ├── Commands │ │ └── .gitkeep │ └── Events │ │ └── .gitkeep ├── Http │ ├── Controllers │ │ ├── Api │ │ │ ├── MarkdownController.php │ │ │ └── ToDoController.php │ │ ├── Controller.php │ │ ├── HomeController.php │ │ ├── MarkdownController.php │ │ ├── Old │ │ │ └── LegacyController.php │ │ └── ToDoController.php │ ├── Kernel.php │ ├── Middleware │ │ ├── Authenticate.php │ │ ├── RedirectIfAuthenticated.php │ │ └── VerifyCsrfToken.php │ ├── Requests │ │ ├── LegacyFormRequest.php │ │ ├── MarkdownRequest.php │ │ ├── Request.php │ │ └── ToDoRequest.php │ └── routes.php ├── Providers │ ├── AppServiceProvider.php │ ├── BusServiceProvider.php │ ├── ConfigServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Renders │ └── XsrfTokenComposer.php ├── Repositories │ ├── .gitkeep │ ├── MarkdownRepository.php │ ├── MarkdownRepositoryInterface.php │ ├── ToDoRepository.php │ └── ToDoRepositoryInterface.php └── Services │ └── .gitkeep ├── artisan ├── bootstrap ├── app.php └── autoload.php ├── bower.json ├── build └── logs │ └── .gitignore ├── composer.json ├── composer.lock ├── config ├── app.php ├── auth.php ├── cache.php ├── compile.php ├── database.php ├── filesystems.php ├── mail.php ├── queue.php ├── sample.php ├── services.php ├── session.php └── view.php ├── database ├── .gitignore ├── migrations │ ├── .gitkeep │ ├── 2014_10_12_000000_create_users_table.php │ └── 2014_10_12_100000_create_password_resets_table.php └── seeds │ ├── .gitkeep │ └── DatabaseSeeder.php ├── gulpfile.js ├── package.json ├── phpspec.yml ├── phpunit.xml ├── public ├── .htaccess ├── assets │ ├── css │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap.min.css │ │ ├── github.css │ │ ├── material-wfont.min.css │ │ ├── material.min.css │ │ └── ripples.min.css │ ├── fonts │ │ ├── Material-Design-Icons.eot │ │ ├── Material-Design-Icons.svg │ │ ├── Material-Design-Icons.ttf │ │ ├── Material-Design-Icons.woff │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ ├── Showdown.min.js │ │ ├── bootstrap.min.js │ │ ├── github.min.js │ │ ├── highlight.pack.js │ │ ├── jquery.min.js │ │ ├── material.min.js │ │ ├── prettify.min.js │ │ ├── react-with-addons.min.js │ │ ├── react.min.js │ │ ├── ripples.min.js │ │ ├── sizzle.min.js │ │ ├── table.min.js │ │ └── twitter.min.js ├── css │ └── app.css ├── favicon.ico ├── index.php ├── js │ ├── markdown.js │ └── todo.js └── robots.txt ├── resources ├── js │ └── react │ │ ├── markdown.jsx │ │ └── todo.jsx ├── lang │ └── en │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── views │ ├── elements │ ├── footer.blade.php │ └── header.blade.php │ ├── errors │ └── 503.blade.php │ ├── home │ └── index.blade.php │ ├── layouts │ └── default.blade.php │ ├── legacy │ └── old │ │ ├── apply.blade.php │ │ ├── confirm.blade.php │ │ └── form.blade.php │ ├── markdown │ └── index.blade.php │ └── todo │ └── index.blade.php ├── server.php ├── storage ├── .gitignore ├── app │ └── markdown │ │ ├── .gitignore │ │ └── markdown.md ├── framework │ ├── .gitignore │ ├── cache │ │ └── .gitignore │ ├── sessions │ │ └── .gitignore │ └── views │ │ └── .gitignore └── logs │ └── .gitignore └── tests ├── Commands └── MarkdwonCommandTest.php ├── ControllersTest.php ├── Events └── ToDoEventTest.php ├── ExampleTest.php ├── ExceptionHandlerTest.php ├── Renders └── XsrfTokenComposerTest.php ├── TestCase.php ├── ToDoRepositoryTest.php └── resources └── testing.md /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "vendor/bower_components" 3 | } -------------------------------------------------------------------------------- /.coveralls.yml: -------------------------------------------------------------------------------- 1 | src_dir: ./ 2 | coverage_clover: build/logs/clover.xml 3 | json_path: build/logs/coveralls-upload.json 4 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_DEBUG=true 3 | APP_KEY=SomeRandomString 4 | 5 | DB_HOST=localhost 6 | DB_DATABASE=homestead 7 | DB_USERNAME=homestead 8 | DB_PASSWORD=secret 9 | 10 | CACHE_DRIVER=file 11 | SESSION_DRIVER=file 12 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | .env 3 | .idea 4 | /node_modules 5 | /resources/assets 6 | _ide_helper.php 7 | 8 | -------------------------------------------------------------------------------- /.scrutinizer.yml: -------------------------------------------------------------------------------- 1 | tools: 2 | external_code_coverage: false 3 | checks: 4 | php: 5 | code_rating: true 6 | duplication: true 7 | filter: 8 | excluded_paths: 9 | - tests/* 10 | - spec/* 11 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | php: 3 | - 5.4 4 | - 5.5 5 | - 5.6 6 | - hhvm 7 | before_script: 8 | - composer self-update 9 | - composer install 10 | - chmod -R 777 storage 11 | script: 12 | - mkdir -p build/logs 13 | - chmod -R 777 build/logs 14 | - chmod -R 777 tests/resources 15 | - phpunit 16 | after_script: 17 | - php vendor/bin/coveralls -v 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Laravel5.BasicArchitecture 2 | [![Build Status](https://travis-ci.org/ytake/Laravel5.BasicArchitecture.svg)](https://travis-ci.org/ytake/Laravel5.BasicArchitecture) 3 | [![Coverage Status](https://coveralls.io/repos/ytake/Laravel5.BasicArchitecture/badge.svg?branch=develop-basic)](https://coveralls.io/r/ytake/Laravel5.BasicArchitecture?branch=develop-basic) 4 | [![Scrutinizer Code Quality](http://img.shields.io/scrutinizer/g/ytake/Laravel5.BasicArchitecture.svg?style=flat)](https://scrutinizer-ci.com/g/ytake/Laravel5.BasicArchitecture/?branch=develop-basic) 5 | ![Laravel5.BasicArchitecture](http://img.shields.io/badge/ytake-Laravel5.BasicArchitecture-yellowgreen.svg?style=flat) 6 | [![Dependency Status](https://www.versioneye.com/user/projects/54b7d9e605064657eb0001e5/badge.svg?style=flat)](https://www.versioneye.com/user/projects/54b7d9e605064657eb0001e5) 7 | [![Dependency Status](https://www.versioneye.com/user/projects/54b7d9e4050646ca5c0001dd/badge.svg?style=flat)](https://www.versioneye.com/user/projects/54b7d9e4050646ca5c0001dd) 8 | [![Dependency Status](https://www.versioneye.com/user/projects/54b7da2405064657eb00023d/badge.svg?style=flat)](https://www.versioneye.com/user/projects/54b7da2405064657eb00023d) 9 | 10 | [![SensioLabsInsight](https://insight.sensiolabs.com/projects/d189ea77-de47-4869-8889-b7ac8ccd879a/mini.png)](https://insight.sensiolabs.com/projects/d189ea77-de47-4869-8889-b7ac8ccd879a) 11 | 12 | ## Samples 13 | 14 | ### ToDo Application 15 | Session Store / Events / laravel-elixir / React.js 16 | 17 | ### Realtime Markdown Editor 18 | Filesystem / CommandBus / laravel-elixir / React.js 19 | 20 | ### Simple Form 21 | form Request / Legacy Controller & no namespace (by classmap) 22 | 23 | -------------------------------------------------------------------------------- /app/Commands/Command.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class MarkdownCommand extends Command implements SelfHandling 13 | { 14 | 15 | /** @var string */ 16 | protected $markdown; 17 | 18 | /** 19 | * @param $markdown 20 | */ 21 | public function __construct($markdown) 22 | { 23 | $this->markdown = $markdown; 24 | } 25 | 26 | /** 27 | * @param MarkdownRepositoryInterface $markdown 28 | */ 29 | public function handle(MarkdownRepositoryInterface $markdown) 30 | { 31 | $markdown->put($this->markdown); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /app/Console/Commands/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/app/Console/Commands/.gitkeep -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class ToDoEvent extends Event 13 | { 14 | 15 | /** @var Log */ 16 | protected $log; 17 | 18 | /** 19 | * @param Log $log 20 | */ 21 | public function __construct(Log $log) 22 | { 23 | $this->log = $log; 24 | } 25 | 26 | /** 27 | * @return void 28 | */ 29 | public function handle() 30 | { 31 | $this->log->useFiles(storage_path('logs/todo.log')); 32 | $this->log->info("added new Task", ["created" => Carbon::now()->getTimestamp()]); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class Handler extends ExceptionHandler 13 | { 14 | 15 | /** 16 | * A list of the exception types that should not be reported. 17 | * 18 | * @var array 19 | */ 20 | protected $dontReport = [ 21 | 'Symfony\Component\HttpKernel\Exception\HttpException' 22 | ]; 23 | 24 | /** 25 | * Report or log an exception. 26 | * 27 | * This is a great spot to send exceptions to Sentry, Bugsnag, etc. 28 | * 29 | * @param \Exception $e 30 | * @return void 31 | */ 32 | public function report(Exception $e) 33 | { 34 | parent::report($e); 35 | } 36 | 37 | /** 38 | * Render an exception into an HTTP response. 39 | * 40 | * @param \Illuminate\Http\Request $request 41 | * @param \Exception $e 42 | * @return \Illuminate\Http\Response 43 | */ 44 | public function render($request, Exception $e) 45 | { 46 | if ($this->isHttpException($e)) { 47 | return $this->renderHttpException($e); 48 | } 49 | if($e instanceof \Illuminate\Session\TokenMismatchException) { 50 | if($request->ajax()) { 51 | return \Response::json(["error" => $e->getMessage()], 500); 52 | } 53 | return redirect("/"); 54 | } 55 | return parent::render($request, $e); 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /app/Handlers/Commands/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/app/Handlers/Commands/.gitkeep -------------------------------------------------------------------------------- /app/Handlers/Events/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/app/Handlers/Events/.gitkeep -------------------------------------------------------------------------------- /app/Http/Controllers/Api/MarkdownController.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | class MarkdownController extends Controller 15 | { 16 | 17 | use DispatchesCommands; 18 | 19 | /** @var MarkdownRepositoryInterface */ 20 | protected $markdown; 21 | 22 | /** 23 | * @param MarkdownRepositoryInterface $markdown 24 | */ 25 | public function __construct(MarkdownRepositoryInterface $markdown) 26 | { 27 | $this->markdown = $markdown; 28 | } 29 | 30 | /** 31 | * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response 32 | */ 33 | public function index() 34 | { 35 | return response(["markdown" => $this->markdown->read()]); 36 | } 37 | 38 | /** 39 | * @param MarkdownRequest $request 40 | * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response 41 | */ 42 | public function store(MarkdownRequest $request) 43 | { 44 | $this->dispatchFrom("App\Commands\MarkdownCommand", $request); 45 | return response(["markdown" => $request->markdown]); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /app/Http/Controllers/Api/ToDoController.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | class ToDoController extends Controller 15 | { 16 | 17 | /** @var TodoRepositoryInterface */ 18 | protected $todo; 19 | 20 | /** 21 | * @param TodoRepositoryInterface $todo 22 | */ 23 | public function __construct(TodoRepositoryInterface $todo) 24 | { 25 | $this->todo = $todo; 26 | } 27 | 28 | /** 29 | * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response 30 | */ 31 | public function index() 32 | { 33 | return response($this->todo->all()); 34 | } 35 | 36 | /** 37 | * @param ToDoRequest $request 38 | * @param Dispatcher $dispatcher 39 | * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response 40 | */ 41 | public function store(ToDoRequest $request, Dispatcher $dispatcher) 42 | { 43 | $this->todo->store($request->get("title")); 44 | $dispatcher->fire('todo.add'); 45 | return response($this->todo->all()); 46 | } 47 | 48 | /** 49 | * @param $id 50 | * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response 51 | */ 52 | public function destroy($id) 53 | { 54 | $this->todo->remove($id); 55 | return response($this->todo->all()); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /app/Http/Controllers/Controller.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | class MarkdownController extends Controller 10 | { 11 | 12 | /** 13 | * @return \Illuminate\View\View 14 | */ 15 | public function index() 16 | { 17 | return view('markdown.index'); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Controllers/Old/LegacyController.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class LegacyController extends \App\Http\Controllers\Controller 12 | { 13 | 14 | /** 15 | * @return \Illuminate\View\View 16 | */ 17 | public function getForm() 18 | { 19 | return view('legacy.old.form'); 20 | } 21 | 22 | /** 23 | * フォームリクエストと、これまでのViewファサードを利用した例 24 | * 25 | * @param \App\Http\Requests\LegacyFormRequest $request 26 | * @return \Illuminate\View\View 27 | */ 28 | public function postConfirm(\App\Http\Requests\LegacyFormRequest $request) 29 | { 30 | // global function 31 | return View::make('legacy.old.confirm'); 32 | } 33 | 34 | /** 35 | * Requestクラスをメソッドインジェクションで利用せずに、 36 | * 従来のInputファサードを利用する例 37 | * @param \Illuminate\Http\Request $request 38 | * @return $this 39 | */ 40 | public function postApply(\Illuminate\Http\Request $request) 41 | { 42 | if(!is_null($request->_return)) { 43 | return \Redirect::route('legacy.form')->withInput(); 44 | } 45 | $request = Input::only('name', 'email'); 46 | // 同様にnamespaceを利用せずにEloquentなどを利用することができます 47 | Session::forget('_token'); 48 | return view('legacy.old.apply')->with('request', $request); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /app/Http/Controllers/ToDoController.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | class ToDoController extends Controller 10 | { 11 | 12 | /** 13 | * @return \Illuminate\View\View 14 | */ 15 | public function index() 16 | { 17 | return view('todo.index'); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class Kernel extends HttpKernel 12 | { 13 | 14 | /** 15 | * The application's global HTTP middleware stack. 16 | * 17 | * @var array 18 | */ 19 | protected $middleware = [ 20 | 'Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode', 21 | 'Illuminate\Cookie\Middleware\EncryptCookies', 22 | 'Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse', 23 | 'Illuminate\Session\Middleware\StartSession', 24 | 'Illuminate\View\Middleware\ShareErrorsFromSession', 25 | 'App\Http\Middleware\VerifyCsrfToken', 26 | ]; 27 | 28 | /** 29 | * The application's route middleware. 30 | * 31 | * @var array 32 | */ 33 | protected $routeMiddleware = [ 34 | 'auth' => 'App\Http\Middleware\Authenticate', 35 | 'auth.basic' => 'Illuminate\Auth\Middleware\AuthenticateWithBasicAuth', 36 | 'guest' => 'App\Http\Middleware\RedirectIfAuthenticated', 37 | ]; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 24 | } 25 | 26 | /** 27 | * Handle an incoming request. 28 | * 29 | * @param \Illuminate\Http\Request $request 30 | * @param \Closure $next 31 | * @return mixed 32 | */ 33 | public function handle($request, Closure $next) 34 | { 35 | if ($this->auth->guest()) 36 | { 37 | if ($request->ajax()) 38 | { 39 | return response('Unauthorized.', 401); 40 | } 41 | else 42 | { 43 | return redirect()->guest('auth/login'); 44 | } 45 | } 46 | 47 | return $next($request); 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | auth = $auth; 25 | } 26 | 27 | /** 28 | * Handle an incoming request. 29 | * 30 | * @param \Illuminate\Http\Request $request 31 | * @param \Closure $next 32 | * @return mixed 33 | */ 34 | public function handle($request, Closure $next) 35 | { 36 | if ($this->auth->check()) 37 | { 38 | return new RedirectResponse(url('/home')); 39 | } 40 | 41 | return $next($request); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /app/Http/Middleware/VerifyCsrfToken.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class VerifyCsrfToken extends BaseVerifier 13 | { 14 | 15 | /** 16 | * Handle an incoming request. 17 | * 18 | * @param \Illuminate\Http\Request $request 19 | * @param \Closure $next 20 | * @return mixed 21 | */ 22 | public function handle($request, Closure $next) 23 | { 24 | return parent::handle($request, $next); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /app/Http/Requests/LegacyFormRequest.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | class LegacyFormRequest extends Request 10 | { 11 | 12 | /** @var string */ 13 | protected $redirectRoute = "legacy.form"; 14 | 15 | /** 16 | * @return array 17 | */ 18 | public function rules() 19 | { 20 | return [ 21 | "name" => "required", 22 | "email" => "required|email" 23 | ]; 24 | } 25 | 26 | /** 27 | * @return bool 28 | */ 29 | public function authorize() 30 | { 31 | return true; 32 | } 33 | 34 | /** 35 | * custom error message 36 | * @return array 37 | */ 38 | public function messages() 39 | { 40 | return [ 41 | "name.required" => "名前を入力してください", 42 | "email.required" => "メールアドレスを入力してください", 43 | "email.email" => "メールアドレスを正しく入力してください", 44 | ]; 45 | } 46 | 47 | } 48 | -------------------------------------------------------------------------------- /app/Http/Requests/MarkdownRequest.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class MarkdownRequest extends Request 12 | { 13 | 14 | /** 15 | * @return array 16 | */ 17 | public function rules() 18 | { 19 | return [ 20 | "markdown" => "required" 21 | ]; 22 | } 23 | 24 | /** 25 | * @return bool 26 | */ 27 | public function authorize() 28 | { 29 | return true; 30 | } 31 | 32 | /** 33 | * @param array $errors 34 | * @return JsonResponse 35 | */ 36 | public function response(array $errors) 37 | { 38 | return new JsonResponse($errors, 403); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/Http/Requests/Request.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | class ToDoRequest extends Request 10 | { 11 | 12 | /** 13 | * @return array 14 | */ 15 | public function rules() 16 | { 17 | return [ 18 | "title" => "required" 19 | ]; 20 | } 21 | 22 | /** 23 | * @return bool 24 | */ 25 | public function authorize() 26 | { 27 | return true; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/routes.php: -------------------------------------------------------------------------------- 1 | controller("legacy", "LegacyController", [ 4 | "getForm" => 'legacy.form', 5 | "postConfirm" => 'legacy.confirm', 6 | "postApply" => 'legacy.apply' 7 | ]); 8 | $router->group(["namespace" => "App\Http\Controllers"], function ($router) { 9 | $router->get('', ['uses' => "HomeController@index", 'as' => 'index']); 10 | $router->get("todo", ['uses' => "ToDoController@index", 'as' => 'todo.front.index']); 11 | $router->get("markdown", ['uses' => "MarkdownController@index", 'as' => 'markdown.index']); 12 | 13 | $router->group(['prefix' => 'api/v1', "namespace" => "Api"], function ($router) { 14 | $router->resource("todo", "ToDoController", [ 15 | "names" => [ 16 | "index" => "api.todo.index", 17 | "store" => "api.todo.store", 18 | "destroy" => "api.todo.destroy" 19 | ], 20 | "only" => [ 21 | "index", "store", "destroy" 22 | ] 23 | ]); 24 | $router->resource("markdown", "MarkdownController", [ 25 | "names" => [ 26 | "index" => "api.markdown.index", 27 | "store" => "api.markdown.store" 28 | ], 29 | "only" => [ 30 | "index", "store" 31 | ] 32 | ]); 33 | }); 34 | }); 35 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class AppServiceProvider extends ServiceProvider 12 | { 13 | 14 | /** 15 | * Bootstrap any application services. 16 | * 17 | * @return void 18 | */ 19 | public function boot() 20 | { 21 | 22 | } 23 | 24 | /** 25 | * Register any application services. 26 | * 27 | * This service provider is a great spot to register your various container 28 | * bindings with the application. As you can see, we are registering our 29 | * "Registrar" implementation here. You can add your own bindings too! 30 | * 31 | * @return void 32 | */ 33 | public function register() 34 | { 35 | $this->app->bind( 36 | 'Illuminate\Contracts\Auth\Registrar', 37 | 'App\Services\Registrar' 38 | ); 39 | $this->app->when('App\Http\Controllers\Api\ToDoController') 40 | ->needs("App\Repositories\ToDoRepositoryInterface") 41 | ->give("App\Repositories\ToDoRepository"); 42 | // 43 | $this->app->bind( 44 | "App\Repositories\MarkdownRepositoryInterface", 45 | "App\Repositories\MarkdownRepository" 46 | ); 47 | // field injection 48 | $this->app->resolving("App\Repositories\MarkdownRepositoryInterface", function ($app) { 49 | $app->path = config('sample.markdown'); 50 | }); 51 | // view compose 52 | $this->app->view->composer(['markdown.index', 'todo.index'], "App\Renders\XsrfTokenComposer"); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /app/Providers/BusServiceProvider.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class BusServiceProvider extends ServiceProvider 13 | { 14 | 15 | /** 16 | * Bootstrap any application services. 17 | * 18 | * @param \Illuminate\Bus\Dispatcher $dispatcher 19 | * @return void 20 | */ 21 | public function boot(Dispatcher $dispatcher) 22 | { 23 | $dispatcher->mapUsing(function ($command) { 24 | return Dispatcher::simpleMapping( 25 | $command, 'App\Commands', 'App\Handlers\Commands' 26 | ); 27 | }); 28 | } 29 | 30 | /** 31 | * Register any application services. 32 | * 33 | * @return void 34 | */ 35 | public function register() 36 | { 37 | // 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/Providers/ConfigServiceProvider.php: -------------------------------------------------------------------------------- 1 | 10 | */ 11 | class ConfigServiceProvider extends ServiceProvider 12 | { 13 | 14 | /** 15 | * 16 | */ 17 | public function register() 18 | { 19 | if ($this->app->environment("local")) { 20 | $this->app->register('Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider'); 21 | } 22 | 23 | config([ 24 | // 25 | ]); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class EventServiceProvider extends ServiceProvider 13 | { 14 | 15 | /** 16 | * The event handler mappings for the application. 17 | * 18 | * @var array 19 | */ 20 | protected $listen = [ 21 | 'todo.add' => [ 22 | 'App\Events\ToDoEvent', 23 | ] 24 | ]; 25 | 26 | /** 27 | * Register any other events for your application. 28 | * 29 | * @param \Illuminate\Contracts\Events\Dispatcher $events 30 | * @return void 31 | */ 32 | public function boot(DispatcherContract $events) 33 | { 34 | parent::boot($events); 35 | // 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class RouteServiceProvider extends ServiceProvider 13 | { 14 | 15 | /** 16 | * @var string 17 | */ 18 | protected $namespace = null; 19 | 20 | /** 21 | * Define your route model bindings, pattern filters, etc. 22 | * 23 | * @param \Illuminate\Routing\Router $router 24 | * @return void 25 | */ 26 | public function boot(Router $router) 27 | { 28 | parent::boot($router); 29 | 30 | // 31 | } 32 | 33 | /** 34 | * @param Router $router 35 | */ 36 | public function map(Router $router) 37 | { 38 | $router->group(['namespace' => $this->namespace], function ($router) { 39 | require app_path('Http/routes.php'); 40 | }); 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /app/Renders/XsrfTokenComposer.php: -------------------------------------------------------------------------------- 1 | 11 | */ 12 | class XsrfTokenComposer 13 | { 14 | 15 | /** @var Encrypter */ 16 | protected $encrypt; 17 | 18 | /** 19 | * @param Encrypter $encrypt 20 | */ 21 | public function __construct(Encrypter $encrypt) 22 | { 23 | $this->encrypt = $encrypt; 24 | } 25 | 26 | /** 27 | * Bind data to the view. 28 | * 29 | * @param View $view 30 | * @return void 31 | */ 32 | public function compose(View $view) 33 | { 34 | $view->with('xsrf_token', $this->encrypt->encrypt(csrf_token())); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /app/Repositories/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/app/Repositories/.gitkeep -------------------------------------------------------------------------------- /app/Repositories/MarkdownRepository.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | class MarkdownRepository implements MarkdownRepositoryInterface 10 | { 11 | 12 | /** @var null */ 13 | public $path; 14 | 15 | /** 16 | * @param $path 17 | * @return $this 18 | */ 19 | public function file($path) 20 | { 21 | $this->path = $path; 22 | return $this; 23 | } 24 | 25 | /** 26 | * @return string 27 | */ 28 | public function read() 29 | { 30 | return \File::get($this->path); 31 | } 32 | 33 | /** 34 | * @param $text 35 | * @return int 36 | */ 37 | public function put($text) 38 | { 39 | return \File::put($this->path, $text); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /app/Repositories/MarkdownRepositoryInterface.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | class ToDoRepository implements ToDoRepositoryInterface 10 | { 11 | 12 | /** @var string */ 13 | protected $key = "todo.session"; 14 | 15 | /** @var array */ 16 | protected $default = [ 17 | [ 18 | "id" => 1, 19 | "title" => "hello" 20 | ], 21 | [ 22 | "id" => 2, 23 | "title" => "Laravel5" 24 | ] 25 | ]; 26 | 27 | /** 28 | * @param string $title 29 | * @return mixed 30 | */ 31 | public function store($title) 32 | { 33 | $data = $this->all(); 34 | $result = array_merge($data, [["id" => count($data) + 1, "title" => $title]]); 35 | \Session::set($this->key, $result); 36 | } 37 | 38 | /** 39 | * @return array 40 | */ 41 | public function all() 42 | { 43 | $result = \Session::get($this->key); 44 | if(!count($result)) { 45 | $result = $this->default; 46 | } 47 | return $result; 48 | } 49 | 50 | /** 51 | * @param $id 52 | * @return mixed 53 | */ 54 | public function remove($id) 55 | { 56 | $result = \Session::get($this->key); 57 | foreach($result as $row => $value) { 58 | if($value['id'] === (int)$id) { 59 | unset($result[$row]); 60 | } 61 | } 62 | \Session::set($this->key, $result); 63 | return $this->all(); 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /app/Repositories/ToDoRepositoryInterface.php: -------------------------------------------------------------------------------- 1 | make('Illuminate\Contracts\Console\Kernel'); 32 | 33 | $status = $kernel->handle( 34 | $input = new Symfony\Component\Console\Input\ArgvInput, 35 | new Symfony\Component\Console\Output\ConsoleOutput 36 | ); 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Shutdown The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once Artisan has finished running. We will fire off the shutdown events 44 | | so that any final work may be done by the application before we shut 45 | | down the process. This is the last thing to happen to the request. 46 | | 47 | */ 48 | 49 | $kernel->terminate($input, $status); 50 | 51 | exit($status); 52 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | 'Illuminate\Contracts\Http\Kernel', 31 | 'App\Http\Kernel' 32 | ); 33 | 34 | $app->singleton( 35 | 'Illuminate\Contracts\Console\Kernel', 36 | 'App\Console\Kernel' 37 | ); 38 | 39 | $app->singleton( 40 | 'Illuminate\Contracts\Debug\ExceptionHandler', 41 | 'App\Exceptions\Handler' 42 | ); 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Return The Application 47 | |-------------------------------------------------------------------------- 48 | | 49 | | This script returns the application instance. The instance is given to 50 | | the calling script so we can separate the building of the instances 51 | | from the actual running of the application and sending responses. 52 | | 53 | */ 54 | 55 | return $app; 56 | -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | env('APP_DEBUG'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application URL 21 | |-------------------------------------------------------------------------- 22 | | 23 | | This URL is used by the console to properly generate URLs when using 24 | | the Artisan command line tool. You should set this to the root of 25 | | your application so that it is used when running Artisan tasks. 26 | | 27 | */ 28 | 29 | 'url' => 'http://localhost', 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application Timezone 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here you may specify the default timezone for your application, which 37 | | will be used by the PHP date and date-time functions. We have gone 38 | | ahead and set this to a sensible default for you out of the box. 39 | | 40 | */ 41 | 42 | 'timezone' => 'Asia/Tokyo', 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application Locale Configuration 47 | |-------------------------------------------------------------------------- 48 | | 49 | | The application locale determines the default locale that will be used 50 | | by the translation service provider. You are free to set this value 51 | | to any of the locales which will be supported by the application. 52 | | 53 | */ 54 | 55 | 'locale' => 'en', 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Application Fallback Locale 60 | |-------------------------------------------------------------------------- 61 | | 62 | | The fallback locale determines the locale to use when the current one 63 | | is not available. You may change the value to correspond to any of 64 | | the language folders that are provided through your application. 65 | | 66 | */ 67 | 68 | 'fallback_locale' => 'en', 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Encryption Key 73 | |-------------------------------------------------------------------------- 74 | | 75 | | This key is used by the Illuminate encrypter service and should be set 76 | | to a random, 32 character string, otherwise these encrypted strings 77 | | will not be safe. Please do this before deploying an application! 78 | | 79 | */ 80 | 81 | 'key' => env('APP_KEY', 'SomeRandomString'), 82 | 83 | 'cipher' => MCRYPT_RIJNDAEL_128, 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | Logging Configuration 88 | |-------------------------------------------------------------------------- 89 | | 90 | | Here you may configure the log settings for your application. Out of 91 | | the box, Laravel uses the Monolog PHP logging library. This gives 92 | | you a variety of powerful log handlers / formatters to utilize. 93 | | 94 | | Available Settings: "single", "daily", "syslog", "errorlog" 95 | | 96 | */ 97 | 98 | 'log' => 'daily', 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Autoloaded Service Providers 103 | |-------------------------------------------------------------------------- 104 | | 105 | | The service providers listed here will be automatically loaded on the 106 | | request to your application. Feel free to add your own services to 107 | | this array to grant expanded functionality to your applications. 108 | | 109 | */ 110 | 111 | 'providers' => [ 112 | 113 | /* 114 | * Laravel Framework Service Providers... 115 | */ 116 | 'Illuminate\Foundation\Providers\ArtisanServiceProvider', 117 | 'Illuminate\Auth\AuthServiceProvider', 118 | 'Illuminate\Bus\BusServiceProvider', 119 | 'Illuminate\Cache\CacheServiceProvider', 120 | 'Illuminate\Foundation\Providers\ConsoleSupportServiceProvider', 121 | 'Illuminate\Routing\ControllerServiceProvider', 122 | 'Illuminate\Cookie\CookieServiceProvider', 123 | 'Illuminate\Database\DatabaseServiceProvider', 124 | 'Illuminate\Encryption\EncryptionServiceProvider', 125 | 'Illuminate\Filesystem\FilesystemServiceProvider', 126 | 'Illuminate\Foundation\Providers\FoundationServiceProvider', 127 | 'Illuminate\Hashing\HashServiceProvider', 128 | 'Illuminate\Mail\MailServiceProvider', 129 | 'Illuminate\Pagination\PaginationServiceProvider', 130 | 'Illuminate\Pipeline\PipelineServiceProvider', 131 | 'Illuminate\Queue\QueueServiceProvider', 132 | 'Illuminate\Redis\RedisServiceProvider', 133 | 'Illuminate\Auth\Passwords\PasswordResetServiceProvider', 134 | 'Illuminate\Session\SessionServiceProvider', 135 | 'Illuminate\Translation\TranslationServiceProvider', 136 | 'Illuminate\Validation\ValidationServiceProvider', 137 | 'Illuminate\View\ViewServiceProvider', 138 | 139 | /* 140 | * Application Service Providers... 141 | */ 142 | 'App\Providers\AppServiceProvider', 143 | 'App\Providers\BusServiceProvider', 144 | 'App\Providers\ConfigServiceProvider', 145 | 'App\Providers\EventServiceProvider', 146 | 'App\Providers\RouteServiceProvider', 147 | 148 | ], 149 | 150 | /* 151 | |-------------------------------------------------------------------------- 152 | | Class Aliases 153 | |-------------------------------------------------------------------------- 154 | | 155 | | This array of class aliases will be registered when this application 156 | | is started. However, feel free to register as many as you wish as 157 | | the aliases are "lazy" loaded so they don't hinder performance. 158 | | 159 | */ 160 | 161 | 'aliases' => [ 162 | 163 | 'App' => 'Illuminate\Support\Facades\App', 164 | 'Artisan' => 'Illuminate\Support\Facades\Artisan', 165 | 'Auth' => 'Illuminate\Support\Facades\Auth', 166 | 'Blade' => 'Illuminate\Support\Facades\Blade', 167 | 'Bus' => 'Illuminate\Support\Facades\Bus', 168 | 'Cache' => 'Illuminate\Support\Facades\Cache', 169 | 'Config' => 'Illuminate\Support\Facades\Config', 170 | 'Cookie' => 'Illuminate\Support\Facades\Cookie', 171 | 'Crypt' => 'Illuminate\Support\Facades\Crypt', 172 | 'DB' => 'Illuminate\Support\Facades\DB', 173 | 'Eloquent' => 'Illuminate\Database\Eloquent\Model', 174 | 'Event' => 'Illuminate\Support\Facades\Event', 175 | 'File' => 'Illuminate\Support\Facades\File', 176 | 'Hash' => 'Illuminate\Support\Facades\Hash', 177 | 'Input' => 'Illuminate\Support\Facades\Input', 178 | 'Inspiring' => 'Illuminate\Foundation\Inspiring', 179 | 'Lang' => 'Illuminate\Support\Facades\Lang', 180 | 'Log' => 'Illuminate\Support\Facades\Log', 181 | 'Mail' => 'Illuminate\Support\Facades\Mail', 182 | 'Password' => 'Illuminate\Support\Facades\Password', 183 | 'Queue' => 'Illuminate\Support\Facades\Queue', 184 | 'Redirect' => 'Illuminate\Support\Facades\Redirect', 185 | 'Redis' => 'Illuminate\Support\Facades\Redis', 186 | 'Request' => 'Illuminate\Support\Facades\Request', 187 | 'Response' => 'Illuminate\Support\Facades\Response', 188 | 'Route' => 'Illuminate\Support\Facades\Route', 189 | 'Schema' => 'Illuminate\Support\Facades\Schema', 190 | 'Session' => 'Illuminate\Support\Facades\Session', 191 | 'Storage' => 'Illuminate\Support\Facades\Storage', 192 | 'URL' => 'Illuminate\Support\Facades\URL', 193 | 'Validator' => 'Illuminate\Support\Facades\Validator', 194 | 'View' => 'Illuminate\Support\Facades\View', 195 | 'VoltDBApi' => 'Ytake\LaravelVoltDB\VoltDBFacade', 196 | ], 197 | 198 | ]; 199 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | 'eloquent', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Authentication Model 23 | |-------------------------------------------------------------------------- 24 | | 25 | | When using the "Eloquent" authentication driver, we need to know which 26 | | Eloquent model should be used to retrieve your users. Of course, it 27 | | is often just the "User" model but you may use whatever you like. 28 | | 29 | */ 30 | 31 | 'model' => 'App\User', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Authentication Table 36 | |-------------------------------------------------------------------------- 37 | | 38 | | When using the "Database" authentication driver, we need to know which 39 | | table should be used to retrieve your users. We have chosen a basic 40 | | default value but you may easily change it to any table you like. 41 | | 42 | */ 43 | 44 | 'table' => 'users', 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Password Reset Settings 49 | |-------------------------------------------------------------------------- 50 | | 51 | | Here you may set the options for resetting passwords including the view 52 | | that is your password reset e-mail. You can also set the name of the 53 | | table that maintains all of the reset tokens for your application. 54 | | 55 | | The expire time is the number of minutes that the reset token should be 56 | | considered valid. This security feature keeps tokens short-lived so 57 | | they have less time to be guessed. You may change this as needed. 58 | | 59 | */ 60 | 61 | 'password' => [ 62 | 'email' => 'emails.password', 63 | 'table' => 'password_resets', 64 | 'expire' => 60, 65 | ], 66 | 67 | ]; 68 | -------------------------------------------------------------------------------- /config/cache.php: -------------------------------------------------------------------------------- 1 | env('CACHE_DRIVER', 'file'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Cache Stores 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the cache "stores" for your application as 24 | | well as their drivers. You may even define multiple stores for the 25 | | same cache driver to group types of items stored in your caches. 26 | | 27 | */ 28 | 29 | 'stores' => [ 30 | 31 | 'apc' => [ 32 | 'driver' => 'apc' 33 | ], 34 | 35 | 'array' => [ 36 | 'driver' => 'array' 37 | ], 38 | 39 | 'voltdb' => [ 40 | 'driver' => 'voltdb' 41 | ], 42 | 43 | 'database' => [ 44 | 'driver' => 'database', 45 | 'table' => 'cache', 46 | 'connection' => null, 47 | ], 48 | 49 | 'file' => [ 50 | 'driver' => 'file', 51 | 'path' => storage_path().'/framework/cache', 52 | ], 53 | 54 | 'memcached' => [ 55 | 'driver' => 'memcached', 56 | 'servers' => [ 57 | [ 58 | 'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100 59 | ], 60 | ], 61 | ], 62 | 63 | 'redis' => [ 64 | 'driver' => 'redis', 65 | 'connection' => 'default', 66 | ], 67 | 68 | ], 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Cache Key Prefix 73 | |-------------------------------------------------------------------------- 74 | | 75 | | When utilizing a RAM based store such as APC or Memcached, there might 76 | | be other applications utilizing the same cache. So, we'll specify a 77 | | value to get prefixed to all our keys so we can avoid collisions. 78 | | 79 | */ 80 | 81 | 'prefix' => 'laravel', 82 | 83 | ]; 84 | -------------------------------------------------------------------------------- /config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | 18 | realpath(__DIR__.'/../app/Providers/AppServiceProvider.php'), 19 | realpath(__DIR__.'/../app/Providers/BusServiceProvider.php'), 20 | realpath(__DIR__.'/../app/Providers/ConfigServiceProvider.php'), 21 | realpath(__DIR__.'/../app/Providers/EventServiceProvider.php'), 22 | realpath(__DIR__.'/../app/Providers/RouteServiceProvider.php'), 23 | 24 | ], 25 | 26 | /* 27 | |-------------------------------------------------------------------------- 28 | | Compiled File Providers 29 | |-------------------------------------------------------------------------- 30 | | 31 | | Here you may list service providers which define a "compiles" function 32 | | that returns additional files that should be compiled, providing an 33 | | easy way to get common files from any packages you are utilizing. 34 | | 35 | */ 36 | 37 | 'providers' => [ 38 | // 39 | ], 40 | 41 | ]; 42 | -------------------------------------------------------------------------------- /config/database.php: -------------------------------------------------------------------------------- 1 | PDO::FETCH_CLASS, 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Default Database Connection Name 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may specify which of the database connections below you wish 24 | | to use as your default connection for all database work. Of course 25 | | you may use many connections at once using the Database library. 26 | | 27 | */ 28 | 29 | 'default' => 'mysql', 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Database Connections 34 | |-------------------------------------------------------------------------- 35 | | 36 | | Here are each of the database connections setup for your application. 37 | | Of course, examples of configuring each database platform that is 38 | | supported by Laravel is shown below to make development simple. 39 | | 40 | | 41 | | All database work in Laravel is done through the PHP PDO facilities 42 | | so make sure you have the driver for your particular database of 43 | | choice installed on your machine before you begin development. 44 | | 45 | */ 46 | 47 | 'connections' => [ 48 | 49 | 'sqlite' => [ 50 | 'driver' => 'sqlite', 51 | 'database' => storage_path().'/database.sqlite', 52 | 'prefix' => '', 53 | ], 54 | 55 | 'mysql' => [ 56 | 'driver' => 'mysql', 57 | 'host' => env('DB_HOST', 'localhost'), 58 | 'database' => env('DB_DATABASE', 'forge'), 59 | 'username' => env('DB_USERNAME', 'forge'), 60 | 'password' => env('DB_PASSWORD', ''), 61 | 'charset' => 'utf8', 62 | 'collation' => 'utf8_unicode_ci', 63 | 'prefix' => '', 64 | 'strict' => false, 65 | ], 66 | 67 | 'pgsql' => [ 68 | 'driver' => 'pgsql', 69 | 'host' => env('DB_HOST', 'localhost'), 70 | 'database' => env('DB_DATABASE', 'forge'), 71 | 'username' => env('DB_USERNAME', 'forge'), 72 | 'password' => env('DB_PASSWORD', ''), 73 | 'charset' => 'utf8', 74 | 'prefix' => '', 75 | 'schema' => 'public', 76 | ], 77 | 78 | 'sqlsrv' => [ 79 | 'driver' => 'sqlsrv', 80 | 'host' => env('DB_HOST', 'localhost'), 81 | 'database' => env('DB_DATABASE', 'forge'), 82 | 'username' => env('DB_USERNAME', 'forge'), 83 | 'password' => env('DB_PASSWORD', ''), 84 | 'prefix' => '', 85 | ], 86 | 'voltdb' => [ 87 | 'driver' => 'voltdb', 88 | 'host' => 'localhost', 89 | 'username' => '', 90 | 'password' => '', 91 | 'port' => 21212 92 | ], 93 | ], 94 | 95 | /* 96 | |-------------------------------------------------------------------------- 97 | | Migration Repository Table 98 | |-------------------------------------------------------------------------- 99 | | 100 | | This table keeps track of all the migrations that have already run for 101 | | your application. Using this information, we can determine which of 102 | | the migrations on disk haven't actually been run in the database. 103 | | 104 | */ 105 | 106 | 'migrations' => 'migrations', 107 | 108 | /* 109 | |-------------------------------------------------------------------------- 110 | | Redis Databases 111 | |-------------------------------------------------------------------------- 112 | | 113 | | Redis is an open source, fast, and advanced key-value store that also 114 | | provides a richer set of commands than a typical key-value systems 115 | | such as APC or Memcached. Laravel makes it easy to dig right in. 116 | | 117 | */ 118 | 119 | 'redis' => [ 120 | 121 | 'cluster' => false, 122 | 123 | 'default' => [ 124 | 'host' => '127.0.0.1', 125 | 'port' => 6379, 126 | 'database' => 0, 127 | ], 128 | 129 | ], 130 | 131 | ]; 132 | -------------------------------------------------------------------------------- /config/filesystems.php: -------------------------------------------------------------------------------- 1 | 'local', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Default Cloud Filesystem Disk 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Many applications store files both locally and in the cloud. For this 26 | | reason, you may specify a default "cloud" driver here. This driver 27 | | will be bound as the Cloud disk implementation in the container. 28 | | 29 | */ 30 | 31 | 'cloud' => 's3', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | Filesystem Disks 36 | |-------------------------------------------------------------------------- 37 | | 38 | | Here you may configure as many filesystem "disks" as you wish, and you 39 | | may even configure multiple disks of the same driver. Defaults have 40 | | been setup for each driver as an example of the required options. 41 | | 42 | */ 43 | 44 | 'disks' => [ 45 | 46 | 'local' => [ 47 | 'driver' => 'local', 48 | 'root' => storage_path().'/app', 49 | ], 50 | 51 | 's3' => [ 52 | 'driver' => 's3', 53 | 'key' => 'your-key', 54 | 'secret' => 'your-secret', 55 | 'region' => 'your-region', 56 | 'bucket' => 'your-bucket', 57 | ], 58 | 59 | 'rackspace' => [ 60 | 'driver' => 'rackspace', 61 | 'username' => 'your-username', 62 | 'key' => 'your-key', 63 | 'container' => 'your-container', 64 | 'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/', 65 | 'region' => 'IAD', 66 | ], 67 | 68 | ], 69 | 70 | ]; 71 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | 'smtp', 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | SMTP Host Address 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may provide the host address of the SMTP server used by your 26 | | applications. A default option is provided that is compatible with 27 | | the Mailgun mail service which will provide reliable deliveries. 28 | | 29 | */ 30 | 31 | 'host' => 'smtp.mailgun.org', 32 | 33 | /* 34 | |-------------------------------------------------------------------------- 35 | | SMTP Host Port 36 | |-------------------------------------------------------------------------- 37 | | 38 | | This is the SMTP port used by your application to deliver e-mails to 39 | | users of the application. Like the host we have set this value to 40 | | stay compatible with the Mailgun e-mail application by default. 41 | | 42 | */ 43 | 44 | 'port' => 587, 45 | 46 | /* 47 | |-------------------------------------------------------------------------- 48 | | Global "From" Address 49 | |-------------------------------------------------------------------------- 50 | | 51 | | You may wish for all e-mails sent by your application to be sent from 52 | | the same address. Here, you may specify a name and address that is 53 | | used globally for all e-mails that are sent by your application. 54 | | 55 | */ 56 | 57 | 'from' => ['address' => null, 'name' => null], 58 | 59 | /* 60 | |-------------------------------------------------------------------------- 61 | | E-Mail Encryption Protocol 62 | |-------------------------------------------------------------------------- 63 | | 64 | | Here you may specify the encryption protocol that should be used when 65 | | the application send e-mail messages. A sensible default using the 66 | | transport layer security protocol should provide great security. 67 | | 68 | */ 69 | 70 | 'encryption' => 'tls', 71 | 72 | /* 73 | |-------------------------------------------------------------------------- 74 | | SMTP Server Username 75 | |-------------------------------------------------------------------------- 76 | | 77 | | If your SMTP server requires a username for authentication, you should 78 | | set it here. This will get used to authenticate with your server on 79 | | connection. You may also set the "password" value below this one. 80 | | 81 | */ 82 | 83 | 'username' => null, 84 | 85 | /* 86 | |-------------------------------------------------------------------------- 87 | | SMTP Server Password 88 | |-------------------------------------------------------------------------- 89 | | 90 | | Here you may set the password required by your SMTP server to send out 91 | | messages from your application. This will be given to the server on 92 | | connection so that the application will be able to send messages. 93 | | 94 | */ 95 | 96 | 'password' => null, 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Sendmail System Path 101 | |-------------------------------------------------------------------------- 102 | | 103 | | When using the "sendmail" driver to send e-mails, we will need to know 104 | | the path to where Sendmail lives on this server. A default path has 105 | | been provided here, which will work well on most of your systems. 106 | | 107 | */ 108 | 109 | 'sendmail' => '/usr/sbin/sendmail -bs', 110 | 111 | /* 112 | |-------------------------------------------------------------------------- 113 | | Mail "Pretend" 114 | |-------------------------------------------------------------------------- 115 | | 116 | | When this option is enabled, e-mail will not actually be sent over the 117 | | web and will instead be written to your application's logs files so 118 | | you may inspect the message. This is great for local development. 119 | | 120 | */ 121 | 122 | 'pretend' => false, 123 | 124 | ]; 125 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Queue Connections 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may configure the connection information for each server that 27 | | is used by your application. A default configuration has been added 28 | | for each back-end shipped with Laravel. You are free to add more. 29 | | 30 | */ 31 | 32 | 'connections' => [ 33 | 34 | 'sync' => [ 35 | 'driver' => 'sync', 36 | ], 37 | 38 | 'database' => [ 39 | 'driver' => 'database', 40 | 'table' => 'jobs', 41 | 'queue' => 'default', 42 | 'expire' => 60, 43 | ], 44 | 45 | 'beanstalkd' => [ 46 | 'driver' => 'beanstalkd', 47 | 'host' => 'localhost', 48 | 'queue' => 'default', 49 | 'ttr' => 60, 50 | ], 51 | 52 | 'sqs' => [ 53 | 'driver' => 'sqs', 54 | 'key' => 'your-public-key', 55 | 'secret' => 'your-secret-key', 56 | 'queue' => 'your-queue-url', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'iron' => [ 61 | 'driver' => 'iron', 62 | 'host' => 'mq-aws-us-east-1.iron.io', 63 | 'token' => 'your-token', 64 | 'project' => 'your-project-id', 65 | 'queue' => 'your-queue-name', 66 | 'encrypt' => true, 67 | ], 68 | 69 | 'redis' => [ 70 | 'driver' => 'redis', 71 | 'queue' => 'default', 72 | 'expire' => 60, 73 | ], 74 | 75 | ], 76 | 77 | /* 78 | |-------------------------------------------------------------------------- 79 | | Failed Queue Jobs 80 | |-------------------------------------------------------------------------- 81 | | 82 | | These options configure the behavior of failed queue job logging so you 83 | | can control which database and table are used to store the jobs that 84 | | have failed. You may change them to any database / table you wish. 85 | | 86 | */ 87 | 88 | 'failed' => [ 89 | 'database' => 'mysql', 'table' => 'failed_jobs', 90 | ], 91 | 92 | ]; 93 | -------------------------------------------------------------------------------- /config/sample.php: -------------------------------------------------------------------------------- 1 | storage_path('app/markdown/markdown.md'), 5 | ]; 6 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => '', 19 | 'secret' => '', 20 | ], 21 | 22 | 'mandrill' => [ 23 | 'secret' => '', 24 | ], 25 | 26 | 'ses' => [ 27 | 'key' => '', 28 | 'secret' => '', 29 | 'region' => 'us-east-1', 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => 'User', 34 | 'secret' => '', 35 | ], 36 | 37 | ]; 38 | -------------------------------------------------------------------------------- /config/session.php: -------------------------------------------------------------------------------- 1 | env('SESSION_DRIVER', 'file'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Session Lifetime 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may specify the number of minutes that you wish the session 27 | | to be allowed to remain idle before it expires. If you want them 28 | | to immediately expire on the browser closing, set that option. 29 | | 30 | */ 31 | 32 | 'lifetime' => 120, 33 | 34 | 'expire_on_close' => false, 35 | 36 | /* 37 | |-------------------------------------------------------------------------- 38 | | Session Encryption 39 | |-------------------------------------------------------------------------- 40 | | 41 | | This option allows you to easily specify that all of your session data 42 | | should be encrypted before it is stored. All encryption will be run 43 | | automatically by Laravel and you can use the Session like normal. 44 | | 45 | */ 46 | 47 | 'encrypt' => false, 48 | 49 | /* 50 | |-------------------------------------------------------------------------- 51 | | Session File Location 52 | |-------------------------------------------------------------------------- 53 | | 54 | | When using the native session driver, we need a location where session 55 | | files may be stored. A default has been set for you but a different 56 | | location may be specified. This is only needed for file sessions. 57 | | 58 | */ 59 | 60 | 'files' => storage_path().'/framework/sessions', 61 | 62 | /* 63 | |-------------------------------------------------------------------------- 64 | | Session Database Connection 65 | |-------------------------------------------------------------------------- 66 | | 67 | | When using the "database" or "redis" session drivers, you may specify a 68 | | connection that should be used to manage these sessions. This should 69 | | correspond to a connection in your database configuration options. 70 | | 71 | */ 72 | 73 | 'connection' => null, 74 | 75 | /* 76 | |-------------------------------------------------------------------------- 77 | | Session Database Table 78 | |-------------------------------------------------------------------------- 79 | | 80 | | When using the "database" session driver, you may specify the table we 81 | | should use to manage the sessions. Of course, a sensible default is 82 | | provided for you; however, you are free to change this as needed. 83 | | 84 | */ 85 | 86 | 'table' => 'sessions', 87 | 88 | /* 89 | |-------------------------------------------------------------------------- 90 | | Session Sweeping Lottery 91 | |-------------------------------------------------------------------------- 92 | | 93 | | Some session drivers must manually sweep their storage location to get 94 | | rid of old sessions from storage. Here are the chances that it will 95 | | happen on a given request. By default, the odds are 2 out of 100. 96 | | 97 | */ 98 | 99 | 'lottery' => [2, 100], 100 | 101 | /* 102 | |-------------------------------------------------------------------------- 103 | | Session Cookie Name 104 | |-------------------------------------------------------------------------- 105 | | 106 | | Here you may change the name of the cookie used to identify a session 107 | | instance by ID. The name specified here will get used every time a 108 | | new session cookie is created by the framework for every driver. 109 | | 110 | */ 111 | 112 | 'cookie' => 'laravel_session', 113 | 114 | /* 115 | |-------------------------------------------------------------------------- 116 | | Session Cookie Path 117 | |-------------------------------------------------------------------------- 118 | | 119 | | The session cookie path determines the path for which the cookie will 120 | | be regarded as available. Typically, this will be the root path of 121 | | your application but you are free to change this when necessary. 122 | | 123 | */ 124 | 125 | 'path' => '/', 126 | 127 | /* 128 | |-------------------------------------------------------------------------- 129 | | Session Cookie Domain 130 | |-------------------------------------------------------------------------- 131 | | 132 | | Here you may change the domain of the cookie used to identify a session 133 | | in your application. This will determine which domains the cookie is 134 | | available to in your application. A sensible default has been set. 135 | | 136 | */ 137 | 138 | 'domain' => null, 139 | 140 | /* 141 | |-------------------------------------------------------------------------- 142 | | HTTPS Only Cookies 143 | |-------------------------------------------------------------------------- 144 | | 145 | | By setting this option to true, session cookies will only be sent back 146 | | to the server if the browser has a HTTPS connection. This will keep 147 | | the cookie from being sent to you if it can not be done securely. 148 | | 149 | */ 150 | 151 | 'secure' => false, 152 | 153 | ]; 154 | -------------------------------------------------------------------------------- /config/view.php: -------------------------------------------------------------------------------- 1 | [ 17 | realpath(base_path('resources/views')) 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled View Path 23 | |-------------------------------------------------------------------------- 24 | | 25 | | This option determines where all the compiled Blade templates will be 26 | | stored for your application. Typically, this is within the storage 27 | | directory. However, as usual, you are free to change this value. 28 | | 29 | */ 30 | 31 | 'compiled' => realpath(storage_path().'/framework/views'), 32 | 33 | ]; 34 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/migrations/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/database/migrations/.gitkeep -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 18 | $table->string('name'); 19 | $table->string('email')->unique(); 20 | $table->string('password', 60); 21 | $table->rememberToken(); 22 | $table->timestamps(); 23 | }); 24 | } 25 | 26 | /** 27 | * Reverse the migrations. 28 | * 29 | * @return void 30 | */ 31 | public function down() 32 | { 33 | Schema::drop('users'); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 18 | $table->string('token')->index(); 19 | $table->timestamp('created_at'); 20 | }); 21 | } 22 | 23 | /** 24 | * Reverse the migrations. 25 | * 26 | * @return void 27 | */ 28 | public function down() 29 | { 30 | Schema::drop('password_resets'); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /database/seeds/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/database/seeds/.gitkeep -------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | ./tests/ 15 | 16 | 17 | 18 | 19 | ./app 20 | 21 | ./app/Providers 22 | ./app 23 | ./app/Http/Requests/Request.php 24 | ./app/Http/Kernel.php 25 | ./app/Http/Middleware/RedirectIfAuthenticated.php 26 | ./app/Http/Middleware/Authenticate.php 27 | ./app/Http/Controllers/Controller.php 28 | ./app/Commands/Command.php 29 | ./app/Events/Event.php 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes... 9 | RewriteRule ^(.*)/$ /$1 [L,R=301] 10 | 11 | # Handle Front Controller... 12 | RewriteCond %{REQUEST_FILENAME} !-d 13 | RewriteCond %{REQUEST_FILENAME} !-f 14 | RewriteRule ^ index.php [L] 15 | 16 | -------------------------------------------------------------------------------- /public/assets/css/bootstrap-theme.min.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.2 (http://getbootstrap.com) 3 | * Copyright 2011-2015 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */.btn-danger,.btn-default,.btn-info,.btn-primary,.btn-success,.btn-warning{text-shadow:0 -1px 0 rgba(0,0,0,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 1px rgba(0,0,0,.075)}.btn-danger.active,.btn-danger:active,.btn-default.active,.btn-default:active,.btn-info.active,.btn-info:active,.btn-primary.active,.btn-primary:active,.btn-success.active,.btn-success:active,.btn-warning.active,.btn-warning:active{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-danger .badge,.btn-default .badge,.btn-info .badge,.btn-primary .badge,.btn-success .badge,.btn-warning .badge{text-shadow:none}.btn.active,.btn:active{background-image:none}.btn-default{text-shadow:0 1px 0 #fff;background-image:-webkit-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-o-linear-gradient(top,#fff 0,#e0e0e0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#e0e0e0));background-image:linear-gradient(to bottom,#fff 0,#e0e0e0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe0e0e0', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#ccc}.btn-default:focus,.btn-default:hover{background-color:#e0e0e0;background-position:0 -15px}.btn-default.active,.btn-default:active{background-color:#e0e0e0;border-color:#dbdbdb}.btn-default.disabled,.btn-default:disabled,.btn-default[disabled]{background-color:#e0e0e0;background-image:none}.btn-primary{background-image:-webkit-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-o-linear-gradient(top,#337ab7 0,#265a88 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#265a88));background-image:linear-gradient(to bottom,#337ab7 0,#265a88 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff265a88', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#245580}.btn-primary:focus,.btn-primary:hover{background-color:#265a88;background-position:0 -15px}.btn-primary.active,.btn-primary:active{background-color:#265a88;border-color:#245580}.btn-primary.disabled,.btn-primary:disabled,.btn-primary[disabled]{background-color:#265a88;background-image:none}.btn-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#419641 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#419641));background-image:linear-gradient(to bottom,#5cb85c 0,#419641 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff419641', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#3e8f3e}.btn-success:focus,.btn-success:hover{background-color:#419641;background-position:0 -15px}.btn-success.active,.btn-success:active{background-color:#419641;border-color:#3e8f3e}.btn-success.disabled,.btn-success:disabled,.btn-success[disabled]{background-color:#419641;background-image:none}.btn-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#2aabd2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#2aabd2));background-image:linear-gradient(to bottom,#5bc0de 0,#2aabd2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2aabd2', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#28a4c9}.btn-info:focus,.btn-info:hover{background-color:#2aabd2;background-position:0 -15px}.btn-info.active,.btn-info:active{background-color:#2aabd2;border-color:#28a4c9}.btn-info.disabled,.btn-info:disabled,.btn-info[disabled]{background-color:#2aabd2;background-image:none}.btn-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#eb9316 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#eb9316));background-image:linear-gradient(to bottom,#f0ad4e 0,#eb9316 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffeb9316', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#e38d13}.btn-warning:focus,.btn-warning:hover{background-color:#eb9316;background-position:0 -15px}.btn-warning.active,.btn-warning:active{background-color:#eb9316;border-color:#e38d13}.btn-warning.disabled,.btn-warning:disabled,.btn-warning[disabled]{background-color:#eb9316;background-image:none}.btn-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c12e2a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c12e2a));background-image:linear-gradient(to bottom,#d9534f 0,#c12e2a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc12e2a', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-color:#b92c28}.btn-danger:focus,.btn-danger:hover{background-color:#c12e2a;background-position:0 -15px}.btn-danger.active,.btn-danger:active{background-color:#c12e2a;border-color:#b92c28}.btn-danger.disabled,.btn-danger:disabled,.btn-danger[disabled]{background-color:#c12e2a;background-image:none}.img-thumbnail,.thumbnail{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{background-color:#e8e8e8;background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{background-color:#2e6da4;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.navbar-default{background-image:-webkit-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-o-linear-gradient(top,#fff 0,#f8f8f8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fff),to(#f8f8f8));background-image:linear-gradient(to bottom,#fff 0,#f8f8f8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff8f8f8', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.15),0 1px 5px rgba(0,0,0,.075)}.navbar-default .navbar-nav>.active>a,.navbar-default .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-o-linear-gradient(top,#dbdbdb 0,#e2e2e2 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dbdbdb),to(#e2e2e2));background-image:linear-gradient(to bottom,#dbdbdb 0,#e2e2e2 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdbdbdb', endColorstr='#ffe2e2e2', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.075);box-shadow:inset 0 3px 9px rgba(0,0,0,.075)}.navbar-brand,.navbar-nav>li>a{text-shadow:0 1px 0 rgba(255,255,255,.25)}.navbar-inverse{background-image:-webkit-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-o-linear-gradient(top,#3c3c3c 0,#222 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#3c3c3c),to(#222));background-image:linear-gradient(to bottom,#3c3c3c 0,#222 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff3c3c3c', endColorstr='#ff222222', GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background-repeat:repeat-x}.navbar-inverse .navbar-nav>.active>a,.navbar-inverse .navbar-nav>.open>a{background-image:-webkit-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-o-linear-gradient(top,#080808 0,#0f0f0f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#080808),to(#0f0f0f));background-image:linear-gradient(to bottom,#080808 0,#0f0f0f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff080808', endColorstr='#ff0f0f0f', GradientType=0);background-repeat:repeat-x;-webkit-box-shadow:inset 0 3px 9px rgba(0,0,0,.25);box-shadow:inset 0 3px 9px rgba(0,0,0,.25)}.navbar-inverse .navbar-brand,.navbar-inverse .navbar-nav>li>a{text-shadow:0 -1px 0 rgba(0,0,0,.25)}.navbar-fixed-bottom,.navbar-fixed-top,.navbar-static-top{border-radius:0}@media (max-width:767px){.navbar .navbar-nav .open .dropdown-menu>.active>a,.navbar .navbar-nav .open .dropdown-menu>.active>a:focus,.navbar .navbar-nav .open .dropdown-menu>.active>a:hover{color:#fff;background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}}.alert{text-shadow:0 1px 0 rgba(255,255,255,.2);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 2px rgba(0,0,0,.05)}.alert-success{background-image:-webkit-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#c8e5bc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#c8e5bc));background-image:linear-gradient(to bottom,#dff0d8 0,#c8e5bc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffc8e5bc', GradientType=0);background-repeat:repeat-x;border-color:#b2dba1}.alert-info{background-image:-webkit-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#b9def0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#b9def0));background-image:linear-gradient(to bottom,#d9edf7 0,#b9def0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffb9def0', GradientType=0);background-repeat:repeat-x;border-color:#9acfea}.alert-warning{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#f8efc0 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#f8efc0));background-image:linear-gradient(to bottom,#fcf8e3 0,#f8efc0 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fff8efc0', GradientType=0);background-repeat:repeat-x;border-color:#f5e79e}.alert-danger{background-image:-webkit-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-o-linear-gradient(top,#f2dede 0,#e7c3c3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#e7c3c3));background-image:linear-gradient(to bottom,#f2dede 0,#e7c3c3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffe7c3c3', GradientType=0);background-repeat:repeat-x;border-color:#dca7a7}.progress{background-image:-webkit-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#ebebeb 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#ebebeb),to(#f5f5f5));background-image:linear-gradient(to bottom,#ebebeb 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffebebeb', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x}.progress-bar{background-image:-webkit-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-o-linear-gradient(top,#337ab7 0,#286090 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#286090));background-image:linear-gradient(to bottom,#337ab7 0,#286090 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff286090', GradientType=0);background-repeat:repeat-x}.progress-bar-success{background-image:-webkit-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-o-linear-gradient(top,#5cb85c 0,#449d44 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5cb85c),to(#449d44));background-image:linear-gradient(to bottom,#5cb85c 0,#449d44 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5cb85c', endColorstr='#ff449d44', GradientType=0);background-repeat:repeat-x}.progress-bar-info{background-image:-webkit-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-o-linear-gradient(top,#5bc0de 0,#31b0d5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#5bc0de),to(#31b0d5));background-image:linear-gradient(to bottom,#5bc0de 0,#31b0d5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff31b0d5', GradientType=0);background-repeat:repeat-x}.progress-bar-warning{background-image:-webkit-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-o-linear-gradient(top,#f0ad4e 0,#ec971f 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f0ad4e),to(#ec971f));background-image:linear-gradient(to bottom,#f0ad4e 0,#ec971f 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff0ad4e', endColorstr='#ffec971f', GradientType=0);background-repeat:repeat-x}.progress-bar-danger{background-image:-webkit-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-o-linear-gradient(top,#d9534f 0,#c9302c 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9534f),to(#c9302c));background-image:linear-gradient(to bottom,#d9534f 0,#c9302c 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9534f', endColorstr='#ffc9302c', GradientType=0);background-repeat:repeat-x}.progress-bar-striped{background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent)}.list-group{border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0,0,0,.075);box-shadow:0 1px 2px rgba(0,0,0,.075)}.list-group-item.active,.list-group-item.active:focus,.list-group-item.active:hover{text-shadow:0 -1px 0 #286090;background-image:-webkit-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2b669a 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2b669a));background-image:linear-gradient(to bottom,#337ab7 0,#2b669a 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2b669a', GradientType=0);background-repeat:repeat-x;border-color:#2b669a}.list-group-item.active .badge,.list-group-item.active:focus .badge,.list-group-item.active:hover .badge{text-shadow:none}.panel{-webkit-box-shadow:0 1px 2px rgba(0,0,0,.05);box-shadow:0 1px 2px rgba(0,0,0,.05)}.panel-default>.panel-heading{background-image:-webkit-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-o-linear-gradient(top,#f5f5f5 0,#e8e8e8 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f5f5f5),to(#e8e8e8));background-image:linear-gradient(to bottom,#f5f5f5 0,#e8e8e8 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#ffe8e8e8', GradientType=0);background-repeat:repeat-x}.panel-primary>.panel-heading{background-image:-webkit-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-o-linear-gradient(top,#337ab7 0,#2e6da4 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#337ab7),to(#2e6da4));background-image:linear-gradient(to bottom,#337ab7 0,#2e6da4 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff337ab7', endColorstr='#ff2e6da4', GradientType=0);background-repeat:repeat-x}.panel-success>.panel-heading{background-image:-webkit-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-o-linear-gradient(top,#dff0d8 0,#d0e9c6 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#dff0d8),to(#d0e9c6));background-image:linear-gradient(to bottom,#dff0d8 0,#d0e9c6 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdff0d8', endColorstr='#ffd0e9c6', GradientType=0);background-repeat:repeat-x}.panel-info>.panel-heading{background-image:-webkit-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-o-linear-gradient(top,#d9edf7 0,#c4e3f3 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#d9edf7),to(#c4e3f3));background-image:linear-gradient(to bottom,#d9edf7 0,#c4e3f3 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffd9edf7', endColorstr='#ffc4e3f3', GradientType=0);background-repeat:repeat-x}.panel-warning>.panel-heading{background-image:-webkit-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-o-linear-gradient(top,#fcf8e3 0,#faf2cc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#fcf8e3),to(#faf2cc));background-image:linear-gradient(to bottom,#fcf8e3 0,#faf2cc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffcf8e3', endColorstr='#fffaf2cc', GradientType=0);background-repeat:repeat-x}.panel-danger>.panel-heading{background-image:-webkit-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-o-linear-gradient(top,#f2dede 0,#ebcccc 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#f2dede),to(#ebcccc));background-image:linear-gradient(to bottom,#f2dede 0,#ebcccc 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2dede', endColorstr='#ffebcccc', GradientType=0);background-repeat:repeat-x}.well{background-image:-webkit-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-o-linear-gradient(top,#e8e8e8 0,#f5f5f5 100%);background-image:-webkit-gradient(linear,left top,left bottom,from(#e8e8e8),to(#f5f5f5));background-image:linear-gradient(to bottom,#e8e8e8 0,#f5f5f5 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe8e8e8', endColorstr='#fff5f5f5', GradientType=0);background-repeat:repeat-x;border-color:#dcdcdc;-webkit-box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1);box-shadow:inset 0 1px 3px rgba(0,0,0,.05),0 1px 0 rgba(255,255,255,.1)} -------------------------------------------------------------------------------- /public/assets/css/github.css: -------------------------------------------------------------------------------- 1 | .hljs{display:block;overflow-x:auto;padding:.5em;color:#333;background:#f8f8f8;-webkit-text-size-adjust:none}.diff .hljs-header,.hljs-comment,.hljs-javadoc{color:#998;font-style:italic}.css .rule .hljs-keyword,.hljs-keyword,.hljs-request,.hljs-status,.hljs-subst,.hljs-winutils,.nginx .hljs-title{color:#333;font-weight:700}.hljs-hexcolor,.hljs-number,.ruby .hljs-constant{color:teal}.hljs-dartdoc,.hljs-phpdoc,.hljs-string,.hljs-tag .hljs-value,.tex .hljs-formula{color:#d14}.hljs-id,.hljs-title,.scss .hljs-preprocessor{color:#900;font-weight:700}.hljs-list .hljs-keyword,.hljs-subst{font-weight:400}.hljs-class .hljs-title,.hljs-type,.tex .hljs-command,.vhdl .hljs-literal{color:#458;font-weight:700}.django .hljs-tag .hljs-keyword,.hljs-rules .hljs-property,.hljs-tag,.hljs-tag .hljs-title{color:navy;font-weight:400}.hljs-attribute,.hljs-variable,.lisp .hljs-body{color:teal}.hljs-regexp{color:#009926}.clojure .hljs-keyword,.hljs-prompt,.hljs-symbol,.lisp .hljs-keyword,.ruby .hljs-symbol .hljs-string,.scheme .hljs-keyword,.tex .hljs-special{color:#990073}.hljs-built_in{color:#0086b3}.hljs-cdata,.hljs-doctype,.hljs-pi,.hljs-pragma,.hljs-preprocessor,.hljs-shebang{color:#999;font-weight:700}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.diff .hljs-change{background:#0086b3}.hljs-chunk{color:#aaa} -------------------------------------------------------------------------------- /public/assets/css/ripples.min.css: -------------------------------------------------------------------------------- 1 | .withripple{position:relative}.ripple-wrapper{position:absolute;top:0;left:0;z-index:1;width:100%;height:100%;overflow:hidden;border-radius:inherit;pointer-events:none}.ripple{position:absolute;width:20px;height:20px;margin-left:-10px;margin-top:-10px;border-radius:100%;background-color:rgba(0,0,0,.05);-webkit-transform:scale(1);-ms-transform:scale(1);transform:scale(1);-webkit-transform-origin:50%;-ms-transform-origin:50%;transform-origin:50%;opacity:0;pointer-events:none}.ripple.ripple-on{transition:opacity .15s ease-in 0s,-webkit-transform .5s cubic-bezier(.4,0,.2,1) .1s;transition:opacity .15s ease-in 0s,transform .5s cubic-bezier(.4,0,.2,1) .1s;opacity:.1}.ripple.ripple-out{transition:opacity .1s linear 0s!important;opacity:0} -------------------------------------------------------------------------------- /public/assets/fonts/Material-Design-Icons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/public/assets/fonts/Material-Design-Icons.eot -------------------------------------------------------------------------------- /public/assets/fonts/Material-Design-Icons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/public/assets/fonts/Material-Design-Icons.ttf -------------------------------------------------------------------------------- /public/assets/fonts/Material-Design-Icons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/public/assets/fonts/Material-Design-Icons.woff -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/public/assets/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/public/assets/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/public/assets/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/assets/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/public/assets/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/assets/js/Showdown.min.js: -------------------------------------------------------------------------------- 1 | /*! showdown 06-01-2015 */ 2 | var Showdown={extensions:{}},forEach=Showdown.forEach=function(a,b){if("function"==typeof a.forEach)a.forEach(b);else{var c,d=a.length;for(c=0;d>c;c++)b(a[c],c,a)}},stdExtName=function(a){return a.replace(/[_-]||\s/g,"").toLowerCase()};Showdown.converter=function(a){var b,c,d,e=0,f=[],g=[];if("undefined"!=typeof module&&"undefined"!=typeof exports&&"undefined"!=typeof require){var h=require("fs");if(h){var i=h.readdirSync((__dirname||".")+"/extensions").filter(function(a){return~a.indexOf(".js")}).map(function(a){return a.replace(/\.js$/,"")});Showdown.forEach(i,function(a){var b=stdExtName(a);Showdown.extensions[b]=require("./extensions/"+a)})}}if(this.makeHtml=function(a){return b={},c={},d=[],a=a.replace(/~/g,"~T"),a=a.replace(/\$/g,"~D"),a=a.replace(/\r\n/g,"\n"),a=a.replace(/\r/g,"\n"),a="\n\n"+a+"\n\n",a=M(a),a=a.replace(/^[ \t]+$/gm,""),Showdown.forEach(f,function(b){a=l(b,a)}),a=z(a),a=n(a),a=m(a),a=p(a),a=K(a),a=a.replace(/~D/g,"$$"),a=a.replace(/~T/g,"~"),Showdown.forEach(g,function(b){a=l(b,a)}),a},a&&a.extensions){var j=this;Showdown.forEach(a.extensions,function(a){if("string"==typeof a&&(a=Showdown.extensions[stdExtName(a)]),"function"!=typeof a)throw"Extension '"+a+"' could not be loaded. It was either not found or is not a valid extension.";Showdown.forEach(a(j),function(a){a.type?"language"===a.type||"lang"===a.type?f.push(a):("output"===a.type||"html"===a.type)&&g.push(a):g.push(a)})})}var k,l=function(a,b){if(a.regex){var c=new RegExp(a.regex,"g");return b.replace(c,a.replace)}return a.filter?a.filter(b):void 0},m=function(a){return a+="~0",a=a.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|(?=~0))/gm,function(a,d,e,f,g){return d=d.toLowerCase(),b[d]=G(e),f?f+g:(g&&(c[d]=g.replace(/"/g,""")),"")}),a=a.replace(/~0/,"")},n=function(a){a=a.replace(/\n/g,"\n\n");return a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm,o),a=a.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|style|section|header|footer|nav|article|aside)\b[^\r]*?<\/\2>[ \t]*(?=\n+)\n)/gm,o),a=a.replace(/(\n[ ]{0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,o),a=a.replace(/(\n\n[ ]{0,3}[ \t]*(?=\n{2,}))/g,o),a=a.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,o),a=a.replace(/\n\n/g,"\n")},o=function(a,b){var c=b;return c=c.replace(/\n\n/g,"\n"),c=c.replace(/^\n/,""),c=c.replace(/\n+$/g,""),c="\n\n~K"+(d.push(c)-1)+"K\n\n"},p=function(a){a=w(a);var b=A("
");return a=a.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\-[ ]?){3,}[ \t]*$/gm,b),a=a.replace(/^[ ]{0,2}([ ]?\_[ ]?){3,}[ \t]*$/gm,b),a=x(a),a=y(a),a=E(a),a=n(a),a=F(a)},q=function(a){return a=B(a),a=r(a),a=H(a),a=u(a),a=s(a),a=I(a),a=G(a),a=D(a),a=a.replace(/ +\n/g,"
\n")},r=function(a){var b=/(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|)/gi;return a=a.replace(b,function(a){var b=a.replace(/(.)<\/?code>(?=.)/g,"$1`");return b=N(b,"\\`*_")})},s=function(a){return a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,t),a=a.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,t),a=a.replace(/(\[([^\[\]]+)\])()()()()()/g,t)},t=function(a,d,e,f,g,h,i,j){void 0==j&&(j="");var k=d,l=e,m=f.toLowerCase(),n=g,o=j;if(""==n)if(""==m&&(m=l.toLowerCase().replace(/ ?\n/g," ")),n="#"+m,void 0!=b[m])n=b[m],void 0!=c[m]&&(o=c[m]);else{if(!(k.search(/\(\s*\)$/m)>-1))return k;n=""}n=N(n,"*_");var p='"},u=function(a){return a=a.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g,v),a=a.replace(/(!\[(.*?)\]\s?\([ \t]*()?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g,v)},v=function(a,d,e,f,g,h,i,j){var k=d,l=e,m=f.toLowerCase(),n=g,o=j;if(o||(o=""),""==n){if(""==m&&(m=l.toLowerCase().replace(/ ?\n/g," ")),n="#"+m,void 0==b[m])return k;n=b[m],void 0!=c[m]&&(o=c[m])}l=l.replace(/"/g,"""),n=N(n,"*_");var p=''+l+''+q(c)+"")}),a=a.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,function(a,c){return A('

'+q(c)+"

")}),a=a.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,function(a,c,d){var e=c.length;return A("'+q(d)+"")})},x=function(a){a+="~0";var b=/^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;return e?a=a.replace(b,function(a,b,c){var d=b,e=c.search(/[*+-]/g)>-1?"ul":"ol";d=d.replace(/\n{2,}/g,"\n\n\n");var f=k(d);return f=f.replace(/\s+$/,""),f="<"+e+">"+f+"\n"}):(b=/(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g,a=a.replace(b,function(a,b,c,d){var e=b,f=c,g=d.search(/[*+-]/g)>-1?"ul":"ol",f=f.replace(/\n{2,}/g,"\n\n\n"),h=k(f);return h=e+"<"+g+">\n"+h+"\n"})),a=a.replace(/~0/,"")};k=function(a){return e++,a=a.replace(/\n{2,}$/,"\n"),a+="~0",a=a.replace(/(\n)?(^[ \t]*)([*+-]|\d+[.])[ \t]+([^\r]+?(\n{1,2}))(?=\n*(~0|\2([*+-]|\d+[.])[ \t]+))/gm,function(a,b,c,d,e){var f=e,g=b;return g||f.search(/\n{2,}/)>-1?f=p(L(f)):(f=x(L(f)),f=f.replace(/\n$/,""),f=q(f)),"
  • "+f+"
  • \n"}),a=a.replace(/~0/g,""),e--,a};var y=function(a){return a+="~0",a=a.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,function(a,b,c){var d=b,e=c;return d=C(L(d)),d=M(d),d=d.replace(/^\n+/g,""),d=d.replace(/\n+$/g,""),d="
    "+d+"\n
    ",A(d)+e}),a=a.replace(/~0/,"")},z=function(a){return a+="~0",a=a.replace(/(?:^|\n)```(.*)\n([\s\S]*?)\n```/g,function(a,b,c){var d=b,e=c;return e=C(e),e=M(e),e=e.replace(/^\n+/g,""),e=e.replace(/\n+$/g,""),e="
    "+e+"\n
    ",A(e)}),a=a.replace(/~0/,"")},A=function(a){return a=a.replace(/(^\n+|\n+$)/g,""),"\n\n~K"+(d.push(a)-1)+"K\n\n"},B=function(a){return a=a.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(a,b,c,d){var e=d;return e=e.replace(/^([ \t]*)/g,""),e=e.replace(/[ \t]*$/g,""),e=C(e),b+""+e+""})},C=function(a){return a=a.replace(/&/g,"&"),a=a.replace(//g,">"),a=N(a,"*_{}[]\\",!1)},D=function(a){return a=a.replace(/(\*\*|__)(?=\S)([^\r]*?\S[*_]*)\1/g,"$2"),a=a.replace(/(\*|_)(?=\S)([^\r]*?\S)\1/g,"$2")},E=function(a){return a=a.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,function(a,b){var c=b;return c=c.replace(/^[ \t]*>[ \t]?/gm,"~0"),c=c.replace(/~0/g,""),c=c.replace(/^[ \t]+$/gm,""),c=p(c),c=c.replace(/(^|\n)/g,"$1 "),c=c.replace(/(\s*
    [^\r]+?<\/pre>)/gm,function(a,b){var c=b;return c=c.replace(/^  /gm,"~0"),c=c.replace(/~0/g,"")}),A("
    \n"+c+"\n
    ")})},F=function(a){a=a.replace(/^\n+/g,""),a=a.replace(/\n+$/g,"");for(var b=a.split(/\n{2,}/g),c=[],e=b.length,f=0;e>f;f++){var g=b[f];g.search(/~K(\d+)K/g)>=0?c.push(g):g.search(/\S/)>=0&&(g=q(g),g=g.replace(/^([ \t]*)/g,"

    "),g+="

    ",c.push(g))}e=c.length;for(var f=0;e>f;f++)for(;c[f].search(/~K(\d+)K/)>=0;){var h=d[RegExp.$1];h=h.replace(/\$/g,"$$$$"),c[f]=c[f].replace(/~K\d+K/,h)}return c.join("\n\n")},G=function(a){return a=a.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"),a=a.replace(/<(?![a-z\/?\$!])/gi,"<")},H=function(a){return a=a.replace(/\\(\\)/g,O),a=a.replace(/\\([`*_{}\[\]()>#+-.!])/g,O)},I=function(a){return a=a.replace(/<((https?|ftp|dict):[^'">\s]+)>/gi,'
    $1'),a=a.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,function(a,b){return J(K(b))})},J=function(a){var b=[function(a){return"&#"+a.charCodeAt(0)+";"},function(a){return"&#x"+a.charCodeAt(0).toString(16)+";"},function(a){return a}];return a="mailto:"+a,a=a.replace(/./g,function(a){if("@"==a)a=b[Math.floor(2*Math.random())](a);else if(":"!=a){var c=Math.random();a=c>.9?b[2](a):c>.45?b[1](a):b[0](a)}return a}),a=''+a+"",a=a.replace(/">.+:/g,'">')},K=function(a){return a=a.replace(/~E(\d+)E/g,function(a,b){var c=parseInt(b);return String.fromCharCode(c)})},L=function(a){return a=a.replace(/^(\t|[ ]{1,4})/gm,"~0"),a=a.replace(/~0/g,"")},M=function(a){return a=a.replace(/\t(?=\t)/g," "),a=a.replace(/\t/g,"~A~B"),a=a.replace(/~B(.+?)~A/g,function(a,b){for(var c=b,d=4-c.length%4,e=0;d>e;e++)c+=" ";return c}),a=a.replace(/~A/g," "),a=a.replace(/~B/g,"")},N=function(a,b,c){var d="(["+b.replace(/([\[\]\\])/g,"\\$1")+"])";c&&(d="\\\\"+d);var e=new RegExp(d,"g");return a=a.replace(e,O)},O=function(a,b){var c=b.charCodeAt(0);return"~E"+c+"E"}},"undefined"!=typeof module&&(module.exports=Showdown),"function"==typeof define&&define.amd&&define("showdown",function(){return Showdown}),"undefined"!=typeof angular&&"undefined"!=typeof Showdown&&!function(a,b){function c(){function a(){var a=new b.converter(c);this.makeHtml=function(b){return a.makeHtml(b)},this.stripHtml=function(a){return String(a).replace(/<[^>]+>/gm,"")}}var c={extensions:[],stripHtml:!0};this.setOption=function(a,b){return c.key=b,this},this.getOption=function(a){return c.hasOwnProperty(a)?c.key:null},this.loadExtension=function(a){return c.extensions.push(a),this},this.$get=function(){return new a}}function d(a){var b=function(b,c){b.$watch("model",function(b){var d;d="string"==typeof b?a.makeHtml(b):typeof b,c.html(d)})};return{restrict:"A",link:b,scope:{model:"=sdModelToHtml"}}}function e(){return function(a){return String(a).replace(/<[^>]+>/gm,"")}}a.provider("$Showdown",c).directive("sdModelToHtml",["$Showdown",d]).filter("sdStripHtml",e)}(angular.module("Showdown",[]),Showdown); -------------------------------------------------------------------------------- /public/assets/js/github.min.js: -------------------------------------------------------------------------------- 1 | /*! showdown 06-01-2015 */ 2 | !function(){var a=function(){return[{type:"lang",regex:"(~T){2}([^~]+)(~T){2}",replace:function(a,b,c){return""+c+""}}]};"undefined"!=typeof window&&window.Showdown&&window.Showdown.extensions&&(window.Showdown.extensions.github=a),"undefined"!=typeof module&&(module.exports=a)}(); -------------------------------------------------------------------------------- /public/assets/js/material.min.js: -------------------------------------------------------------------------------- 1 | !function(a){function b(a){return"undefined"==typeof a.which?!0:"number"==typeof a.which&&a.which>0?!a.ctrlKey&&!a.metaKey&&!a.altKey&&8!=a.which:!1}a.expr[":"].notmdproc=function(b){return a(b).data("mdproc")?!1:!0},a.material={options:{input:!0,ripples:!0,checkbox:!0,togglebutton:!0,radio:!0,arrive:!0,autofill:!1,withRipples:[".btn:not(.btn-link)",".card-image",".navbar a:not(.withoutripple)",".dropdown-menu a",".nav-tabs a:not(.withoutripple)",".withripple"].join(","),inputElements:"input.form-control, textarea.form-control, select.form-control",checkboxElements:".checkbox > label > input[type=checkbox]",togglebuttonElements:".togglebutton > label > input[type=checkbox]",radioElements:".radio > label > input[type=radio]"},checkbox:function(b){a(b?b:this.options.checkboxElements).filter(":notmdproc").data("mdproc",!0).after("")},togglebutton:function(b){a(b?b:this.options.togglebuttonElements).filter(":notmdproc").data("mdproc",!0).after("")},radio:function(b){a(b?b:this.options.radioElements).filter(":notmdproc").data("mdproc",!0).after("")},input:function(c){a(c?c:this.options.inputElements).filter(":notmdproc").data("mdproc",!0).each(function(){var b=a(this);if(b.wrap("
    "),b.after(""),b.hasClass("floating-label")){var c=b.attr("placeholder");b.attr("placeholder",null).removeClass("floating-label"),b.after("
    "+c+"
    ")}if(b.attr("data-hint")&&b.after("
    "+b.attr("data-hint")+"
    "),(null===b.val()||"undefined"==b.val()||""===b.val())&&b.addClass("empty"),b.parent().next().is("[type=file]")){b.parent().addClass("fileinput");var d=b.parent().next().detach();b.after(d)}}),a(document).on("change",".checkbox input[type=checkbox]",function(){a(this).blur()}).on("keydown paste",".form-control",function(c){b(c)&&a(this).removeClass("empty")}).on("keyup change",".form-control",function(){var b=a(this);""===b.val()&&b[0].checkValidity()?b.addClass("empty"):b.removeClass("empty")}).on("focus",".form-control-wrapper.fileinput",function(){a(this).find("input").addClass("focus")}).on("blur",".form-control-wrapper.fileinput",function(){a(this).find("input").removeClass("focus")}).on("change",".form-control-wrapper.fileinput [type=file]",function(){var b="";a.each(a(this)[0].files,function(a,c){b+=c.name+", "}),b=b.substring(0,b.length-2),b?a(this).prev().removeClass("empty"):a(this).prev().addClass("empty"),a(this).prev().val(b)})},ripples:function(b){a(b?b:this.options.withRipples).ripples()},autofill:function(){var b=setInterval(function(){a("input[type!=checkbox]").each(function(){a(this).val()&&a(this).val()!==a(this).attr("value")&&a(this).trigger("change")})},100);setTimeout(function(){clearInterval(b)},1e4);var c;a(document).on("focus","input",function(){var b=a(this).parents("form").find("input").not("[type=file]");c=setInterval(function(){b.each(function(){a(this).val()!==a(this).attr("value")&&a(this).trigger("change")})},100)}).on("blur","input",function(){clearInterval(c)})},init:function(){a.fn.ripples&&this.options.ripples&&this.ripples(),this.options.input&&this.input(),this.options.checkbox&&this.checkbox(),this.options.togglebutton&&this.togglebutton(),this.options.radio&&this.radio(),this.options.autofill&&this.autofill(),document.arrive&&this.options.arrive&&(a.fn.ripples&&this.options.ripples&&a(document).arrive(this.options.withRipples,function(){a.material.ripples(a(this))}),this.options.input&&a(document).arrive(this.options.inputElements,function(){a.material.input(a(this))}),this.options.checkbox&&a(document).arrive(this.options.checkboxElements,function(){a.material.checkbox(a(this))}),this.options.radio&&a(document).arrive(this.options.radioElements,function(){a.material.radio(a(this))}),this.options.togglebutton&&a(document).arrive(this.options.togglebuttonElements,function(){a.material.togglebutton(a(this))}))}}}(jQuery); 2 | //# sourceMappingURL=material.min.js.map -------------------------------------------------------------------------------- /public/assets/js/prettify.min.js: -------------------------------------------------------------------------------- 1 | /*! showdown 06-01-2015 */ 2 | !function(){var a=function(){return[{type:"output",filter:function(a){return a.replace(/(
    )?/gi,function(a,b){return b?'
    ':''})}}]};"undefined"!=typeof window&&window.Showdown&&window.Showdown.extensions&&(window.Showdown.extensions.prettify=a),"undefined"!=typeof module&&(module.exports=a)}();
    
    
    --------------------------------------------------------------------------------
    /public/assets/js/ripples.min.js:
    --------------------------------------------------------------------------------
    1 | !function(a,b,c,d){"use strict";function e(b,c){g=this,this.element=a(b),this.options=a.extend({},h,c),this._defaults=h,this._name=f,this.init()}var f="ripples",g=null,h={};e.prototype.init=function(){var c=this.element;c.on("mousedown touchstart",function(d){if(g.isTouch()&&"mousedown"===d.type)return!1;c.find(".ripple-wrapper").length||c.append('
    ');var e=c.children(".ripple-wrapper"),f=g.getRelY(e,d),h=g.getRelX(e,d);if(f||h){var i=g.getRipplesColor(c),j=a("
    ");j.addClass("ripple").css({left:h,top:f,"background-color":i}),e.append(j),function(){return b.getComputedStyle(j[0]).opacity}(),g.rippleOn(c,j),setTimeout(function(){g.rippleEnd(j)},500),c.on("mouseup mouseleave touchend",function(){j.data("mousedown","off"),"off"===j.data("animating")&&g.rippleOut(j)})}})},e.prototype.getNewSize=function(a,b){return Math.max(a.outerWidth(),a.outerHeight())/b.outerWidth()*2.5},e.prototype.getRelX=function(a,b){var c=a.offset();return g.isTouch()?(b=b.originalEvent,1!==b.touches.length?b.touches[0].pageX-c.left:!1):b.pageX-c.left},e.prototype.getRelY=function(a,b){var c=a.offset();return g.isTouch()?(b=b.originalEvent,1!==b.touches.length?b.touches[0].pageY-c.top:!1):b.pageY-c.top},e.prototype.getRipplesColor=function(a){var c=a.data("ripple-color")?a.data("ripple-color"):b.getComputedStyle(a[0]).color;return c},e.prototype.hasTransitionSupport=function(){var a=c.body||c.documentElement,b=a.style,e=b.transition!==d||b.WebkitTransition!==d||b.MozTransition!==d||b.MsTransition!==d||b.OTransition!==d;return e},e.prototype.isTouch=function(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)},e.prototype.rippleEnd=function(a){a.data("animating","off"),"off"===a.data("mousedown")&&g.rippleOut(a)},e.prototype.rippleOut=function(a){a.off(),g.hasTransitionSupport()?a.addClass("ripple-out"):a.animate({opacity:0},100,function(){a.trigger("transitionend")}),a.on("transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd",function(){a.remove()})},e.prototype.rippleOn=function(a,b){var c=g.getNewSize(a,b);g.hasTransitionSupport()?b.css({"-ms-transform":"scale("+c+")","-moz-transform":"scale("+c+")","-webkit-transform":"scale("+c+")",transform:"scale("+c+")"}).addClass("ripple-on").data("animating","on").data("mousedown","on"):b.animate({width:2*Math.max(a.outerWidth(),a.outerHeight()),height:2*Math.max(a.outerWidth(),a.outerHeight()),"margin-left":-1*Math.max(a.outerWidth(),a.outerHeight()),"margin-top":-1*Math.max(a.outerWidth(),a.outerHeight()),opacity:.2},500,function(){b.trigger("transitionend")})},a.fn.ripples=function(b){return this.each(function(){a.data(this,"plugin_"+f)||a.data(this,"plugin_"+f,new e(this,b))})}}(jQuery,window,document); 2 | //# sourceMappingURL=ripples.min.js.map -------------------------------------------------------------------------------- /public/assets/js/sizzle.min.js: -------------------------------------------------------------------------------- 1 | /*! Sizzle v2.2.0-pre | (c) 2008, 2014 jQuery Foundation, Inc. | jquery.org/license */ 2 | !function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+1*new Date,v=a.document,w=0,x=0,y=hb(),z=hb(),A=hb(),B=function(a,b){return a===b&&(l=!0),0},C=1<<31,D={}.hasOwnProperty,E=[],F=E.pop,G=E.push,H=E.push,I=E.slice,J=function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},K="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",L="[\\x20\\t\\r\\n\\f]",M="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",N=M.replace("w","w#"),O="\\["+L+"*("+M+")(?:"+L+"*([*^$|!~]?=)"+L+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+N+"))|)"+L+"*\\]",P=":("+M+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+O+")*)|.*)\\)|)",Q=new RegExp(L+"+","g"),R=new RegExp("^"+L+"+|((?:^|[^\\\\])(?:\\\\.)*)"+L+"+$","g"),S=new RegExp("^"+L+"*,"+L+"*"),T=new RegExp("^"+L+"*([>+~]|"+L+")"+L+"*"),U=new RegExp("="+L+"*([^\\]'\"]*?)"+L+"*\\]","g"),V=new RegExp(P),W=new RegExp("^"+N+"$"),X={ID:new RegExp("^#("+M+")"),CLASS:new RegExp("^\\.("+M+")"),TAG:new RegExp("^("+M.replace("w","w*")+")"),ATTR:new RegExp("^"+O),PSEUDO:new RegExp("^"+P),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+L+"*(even|odd|(([+-]|)(\\d*)n|)"+L+"*(?:([+-]|)"+L+"*(\\d+)|))"+L+"*\\)|)","i"),bool:new RegExp("^(?:"+K+")$","i"),needsContext:new RegExp("^"+L+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+L+"*((?:-\\d)?\\d*)"+L+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+L+"?|("+L+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;return d!==d||c?b:0>d?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,1023&d|56320)},eb=function(){m()};try{H.apply(E=I.call(v.childNodes),v.childNodes),E[v.childNodes.length].nodeType}catch(fb){H={apply:E.length?function(a,b){G.apply(a,I.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]);a.length=c-1}}}function gb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n&&m(b),b=b||n,d=d||[],k=b.nodeType,"string"!=typeof a||!a||1!==k&&9!==k&&11!==k)return d;if(!e&&p){if(11!==k&&(f=_.exec(a)))if(j=f[1]){if(9===k){if(h=b.getElementById(j),!h||!h.parentNode)return d;if(h.id===j)return d.push(h),d}else if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j)return d.push(h),d}else{if(f[2])return H.apply(d,b.getElementsByTagName(a)),d;if((j=f[3])&&c.getElementsByClassName)return H.apply(d,b.getElementsByClassName(j)),d}if(c.qsa&&(!q||!q.test(a))){if(s=r=u,w=b,x=1!==k&&a,1===k&&"object"!==b.nodeName.toLowerCase()){o=g(a),(r=b.getAttribute("id"))?s=r.replace(bb,"\\$&"):b.setAttribute("id",s),s="[id='"+s+"'] ",l=o.length;while(l--)o[l]=s+rb(o[l]);w=ab.test(a)&&pb(b.parentNode)||b,x=o.join(",")}if(x)try{return H.apply(d,w.querySelectorAll(x)),d}catch(y){}finally{r||b.removeAttribute("id")}}}return i(a.replace(R,"$1"),b,d,e)}function hb(){var a=[];function b(c,e){return a.push(c+" ")>d.cacheLength&&delete b[a.shift()],b[c+" "]=e}return b}function ib(a){return a[u]=!0,a}function jb(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function kb(a,b){var c=a.split("|"),e=a.length;while(e--)d.attrHandle[c[e]]=b}function lb(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&(~b.sourceIndex||C)-(~a.sourceIndex||C);if(d)return d;if(c)while(c=c.nextSibling)if(c===b)return-1;return a?1:-1}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return"input"===c&&b.type===a}}function nb(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function ob(a){return ib(function(b){return b=+b,ib(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function pb(a){return a&&"undefined"!=typeof a.getElementsByTagName&&a}c=gb.support={},f=gb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?"HTML"!==b.nodeName:!1},m=gb.setDocument=function(a){var b,e,g=a?a.ownerDocument||a:v;return g!==n&&9===g.nodeType&&g.documentElement?(n=g,o=g.documentElement,e=g.defaultView,e&&e!==e.top&&(e.addEventListener?e.addEventListener("unload",eb,!1):e.attachEvent&&e.attachEvent("onunload",eb)),p=!f(g),c.attributes=jb(function(a){return a.className="i",!a.getAttribute("className")}),c.getElementsByTagName=jb(function(a){return a.appendChild(g.createComment("")),!a.getElementsByTagName("*").length}),c.getElementsByClassName=$.test(g.getElementsByClassName),c.getById=jb(function(a){return o.appendChild(a).id=u,!g.getElementsByName||!g.getElementsByName(u).length}),c.getById?(d.find.ID=function(a,b){if("undefined"!=typeof b.getElementById&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}},d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}):(delete d.find.ID,d.filter.ID=function(a){var b=a.replace(cb,db);return function(a){var c="undefined"!=typeof a.getAttributeNode&&a.getAttributeNode("id");return c&&c.value===b}}),d.find.TAG=c.getElementsByTagName?function(a,b){return"undefined"!=typeof b.getElementsByTagName?b.getElementsByTagName(a):c.qsa?b.querySelectorAll(a):void 0}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if("*"===a){while(c=f[e++])1===c.nodeType&&d.push(c);return d}return f},d.find.CLASS=c.getElementsByClassName&&function(a,b){return p?b.getElementsByClassName(a):void 0},r=[],q=[],(c.qsa=$.test(g.querySelectorAll))&&(jb(function(a){o.appendChild(a).innerHTML="",a.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+L+"*(?:''|\"\")"),a.querySelectorAll("[selected]").length||q.push("\\["+L+"*(?:value|"+K+")"),a.querySelectorAll("[id~="+u+"-]").length||q.push("~="),a.querySelectorAll(":checked").length||q.push(":checked"),a.querySelectorAll("a#"+u+"+*").length||q.push(".#.+[+~]")}),jb(function(a){var b=g.createElement("input");b.setAttribute("type","hidden"),a.appendChild(b).setAttribute("name","D"),a.querySelectorAll("[name=d]").length&&q.push("name"+L+"*[*^$|!~]?="),a.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),a.querySelectorAll("*,:x"),q.push(",.*:")})),(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&jb(function(a){c.disconnectedMatch=s.call(a,"div"),s.call(a,"[s!='']:x"),r.push("!=",P)}),q=q.length&&new RegExp(q.join("|")),r=r.length&&new RegExp(r.join("|")),b=$.test(o.compareDocumentPosition),t=b||$.test(o.contains)?function(a,b){var c=9===a.nodeType?a.documentElement:a,d=b&&b.parentNode;return a===d||!(!d||1!==d.nodeType||!(c.contains?c.contains(d):a.compareDocumentPosition&&16&a.compareDocumentPosition(d)))}:function(a,b){if(b)while(b=b.parentNode)if(b===a)return!0;return!1},B=b?function(a,b){if(a===b)return l=!0,0;var d=!a.compareDocumentPosition-!b.compareDocumentPosition;return d?d:(d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1,1&d||!c.sortDetached&&b.compareDocumentPosition(a)===d?a===g||a.ownerDocument===v&&t(v,a)?-1:b===g||b.ownerDocument===v&&t(v,b)?1:k?J(k,a)-J(k,b):0:4&d?-1:1)}:function(a,b){if(a===b)return l=!0,0;var c,d=0,e=a.parentNode,f=b.parentNode,h=[a],i=[b];if(!e||!f)return a===g?-1:b===g?1:e?-1:f?1:k?J(k,a)-J(k,b):0;if(e===f)return lb(a,b);c=a;while(c=c.parentNode)h.unshift(c);c=b;while(c=c.parentNode)i.unshift(c);while(h[d]===i[d])d++;return d?lb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0},g):n},gb.matches=function(a,b){return gb(a,null,null,b)},gb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n&&m(a),b=b.replace(U,"='$1']"),!(!c.matchesSelector||!p||r&&r.test(b)||q&&q.test(b)))try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&11!==a.document.nodeType)return d}catch(e){}return gb(b,n,null,[a]).length>0},gb.contains=function(a,b){return(a.ownerDocument||a)!==n&&m(a),t(a,b)},gb.attr=function(a,b){(a.ownerDocument||a)!==n&&m(a);var e=d.attrHandle[b.toLowerCase()],f=e&&D.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):void 0;return void 0!==f?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null},gb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)},gb.uniqueSort=function(a){var b,d=[],e=0,f=0;if(l=!c.detectDuplicates,k=!c.sortStable&&a.slice(0),a.sort(B),l){while(b=a[f++])b===a[f]&&(e=d.push(f));while(e--)a.splice(d[e],1)}return k=null,a},e=gb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(f){if(1===f||9===f||11===f){if("string"==typeof a.textContent)return a.textContent;for(a=a.firstChild;a;a=a.nextSibling)c+=e(a)}else if(3===f||4===f)return a.nodeValue}else while(b=a[d++])c+=e(b);return c},d=gb.selectors={cacheLength:50,createPseudo:ib,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){return a[1]=a[1].replace(cb,db),a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db),"~="===a[2]&&(a[3]=" "+a[3]+" "),a.slice(0,4)},CHILD:function(a){return a[1]=a[1].toLowerCase(),"nth"===a[1].slice(0,3)?(a[3]||gb.error(a[0]),a[4]=+(a[4]?a[5]+(a[6]||1):2*("even"===a[3]||"odd"===a[3])),a[5]=+(a[7]+a[8]||"odd"===a[3])):a[3]&&gb.error(a[0]),a},PSEUDO:function(a){var b,c=!a[6]&&a[2];return X.CHILD.test(a[0])?null:(a[3]?a[2]=a[4]||a[5]||"":c&&V.test(c)&&(b=g(c,!0))&&(b=c.indexOf(")",c.length-b)-c.length)&&(a[0]=a[0].slice(0,b),a[2]=c.slice(0,b)),a.slice(0,3))}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return"*"===a?function(){return!0}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+L+")"+a+"("+L+"|$)"))&&y(a,function(a){return b.test("string"==typeof a.className&&a.className||"undefined"!=typeof a.getAttribute&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=gb.attr(d,a);return null==e?"!="===b:b?(e+="","="===b?e===c:"!="===b?e!==c:"^="===b?c&&0===e.indexOf(c):"*="===b?c&&e.indexOf(c)>-1:"$="===b?c&&e.slice(-c.length)===c:"~="===b?(" "+e.replace(Q," ")+" ").indexOf(c)>-1:"|="===b?e===c||e.slice(0,c.length+1)===c+"-":!1):!0}},CHILD:function(a,b,c,d,e){var f="nth"!==a.slice(0,3),g="last"!==a.slice(-4),h="of-type"===b;return 1===d&&0===e?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p])if(h?l.nodeName.toLowerCase()===r:1===l.nodeType)return!1;o=p="only"===a&&!o&&"nextSibling"}return!0}if(o=[g?q.firstChild:q.lastChild],g&&s){k=q[u]||(q[u]={}),j=k[a]||[],n=j[0]===w&&j[1],m=j[0]===w&&j[2],l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if(1===l.nodeType&&++m&&l===b){k[a]=[w,n,m];break}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w)m=j[1];else while(l=++n&&l&&l[p]||(m=n=0)||o.pop())if((h?l.nodeName.toLowerCase()===r:1===l.nodeType)&&++m&&(s&&((l[u]||(l[u]={}))[a]=[w,m]),l===b))break;return m-=e,m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||gb.error("unsupported pseudo: "+a);return e[u]?e(b):e.length>1?(c=[a,a,"",b],d.setFilters.hasOwnProperty(a.toLowerCase())?ib(function(a,c){var d,f=e(a,b),g=f.length;while(g--)d=J(a,f[g]),a[d]=!(c[d]=f[g])}):function(a){return e(a,0,c)}):e}},pseudos:{not:ib(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?ib(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--)(f=g[h])&&(a[h]=!(b[h]=f))}):function(a,e,f){return b[0]=a,d(b,null,f,c),b[0]=null,!c.pop()}}),has:ib(function(a){return function(b){return gb(a,b).length>0}}),contains:ib(function(a){return a=a.replace(cb,db),function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:ib(function(a){return W.test(a||"")||gb.error("unsupported lang: "+a),a=a.replace(cb,db).toLowerCase(),function(b){var c;do if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang"))return c=c.toLowerCase(),c===a||0===c.indexOf(a+"-");while((b=b.parentNode)&&1===b.nodeType);return!1}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===!1},disabled:function(a){return a.disabled===!0},checked:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&!!a.checked||"option"===b&&!!a.selected},selected:function(a){return a.parentNode&&a.parentNode.selectedIndex,a.selected===!0},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling)if(a.nodeType<6)return!1;return!0},parent:function(a){return!d.pseudos.empty(a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return"input"===b&&"button"===a.type||"button"===b},text:function(a){var b;return"input"===a.nodeName.toLowerCase()&&"text"===a.type&&(null==(b=a.getAttribute("type"))||"text"===b.toLowerCase())},first:ob(function(){return[0]}),last:ob(function(a,b){return[b-1]}),eq:ob(function(a,b,c){return[0>c?c+b:c]}),even:ob(function(a,b){for(var c=0;b>c;c+=2)a.push(c);return a}),odd:ob(function(a,b){for(var c=1;b>c;c+=2)a.push(c);return a}),lt:ob(function(a,b,c){for(var d=0>c?c+b:c;--d>=0;)a.push(d);return a}),gt:ob(function(a,b,c){for(var d=0>c?c+b:c;++db;b++)d+=a[b].value;return d}function sb(a,b,c){var d=b.dir,e=c&&"parentNode"===d,f=x++;return b.first?function(b,c,f){while(b=b[d])if(1===b.nodeType||e)return a(b,c,f)}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d])if((1===b.nodeType||e)&&a(b,c,g))return!0}else while(b=b[d])if(1===b.nodeType||e){if(i=b[u]||(b[u]={}),(h=i[d])&&h[0]===w&&h[1]===f)return j[2]=h[2];if(i[d]=j,j[2]=a(b,c,g))return!0}}}function tb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--)if(!a[e](b,c,d))return!1;return!0}:a[0]}function ub(a,b,c){for(var d=0,e=b.length;e>d;d++)gb(a,b[d],c);return c}function vb(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;i>h;h++)(f=a[h])&&(!c||c(f,d,e))&&(g.push(f),j&&b.push(h));return g}function wb(a,b,c,d,e,f){return d&&!d[u]&&(d=wb(d)),e&&!e[u]&&(e=wb(e,f)),ib(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||ub(b||"*",h.nodeType?[h]:h,[]),q=!a||!f&&b?p:vb(p,m,a,h,i),r=c?e||(f?a:o||d)?[]:g:q;if(c&&c(q,r,h,i),d){j=vb(r,n),d(j,[],h,i),k=j.length;while(k--)(l=j[k])&&(r[n[k]]=!(q[n[k]]=l))}if(f){if(e||a){if(e){j=[],k=r.length;while(k--)(l=r[k])&&j.push(q[k]=l);e(null,r=[],j,i)}k=r.length;while(k--)(l=r[k])&&(j=e?J(f,l):m[k])>-1&&(f[j]=!(g[j]=l))}}else r=vb(r===g?r.splice(o,r.length):r),e?e(null,g,r,i):H.apply(g,r)})}function xb(a){for(var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=sb(function(a){return a===b},h,!0),l=sb(function(a){return J(b,a)>-1},h,!0),m=[function(a,c,d){var e=!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d));return b=null,e}];f>i;i++)if(c=d.relative[a[i].type])m=[sb(tb(m),c)];else{if(c=d.filter[a[i].type].apply(null,a[i].matches),c[u]){for(e=++i;f>e;e++)if(d.relative[a[e].type])break;return wb(i>1&&tb(m),i>1&&rb(a.slice(0,i-1).concat({value:" "===a[i-2].type?"*":""})).replace(R,"$1"),c,e>i&&xb(a.slice(i,e)),f>e&&xb(a=a.slice(e)),f>e&&rb(a))}m.push(c)}return tb(m)}function yb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find.TAG("*",k),v=w+=null==t?1:Math.random()||.1,x=u.length;for(k&&(j=g!==n&&g);q!==x&&null!=(l=u[q]);q++){if(e&&l){m=0;while(o=a[m++])if(o(l,g,h)){i.push(l);break}k&&(w=v)}c&&((l=!o&&l)&&p--,f&&r.push(l))}if(p+=q,c&&q!==p){m=0;while(o=b[m++])o(r,s,g,h);if(f){if(p>0)while(q--)r[q]||s[q]||(s[q]=F.call(i));s=vb(s)}H.apply(i,s),k&&!f&&s.length>0&&p+b.length>1&&gb.uniqueSort(i)}return k&&(w=v,j=t),r};return c?ib(f):f}h=gb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){b||(b=g(a)),c=b.length;while(c--)f=xb(b[c]),f[u]?d.push(f):e.push(f);f=A(a,yb(e,d)),f.selector=a}return f},i=gb.select=function(a,b,e,f){var i,j,k,l,m,n="function"==typeof a&&a,o=!f&&g(a=n.selector||a);if(e=e||[],1===o.length){if(j=o[0]=o[0].slice(0),j.length>2&&"ID"===(k=j[0]).type&&c.getById&&9===b.nodeType&&p&&d.relative[j[1].type]){if(b=(d.find.ID(k.matches[0].replace(cb,db),b)||[])[0],!b)return e;n&&(b=b.parentNode),a=a.slice(j.shift().value.length)}i=X.needsContext.test(a)?0:j.length;while(i--){if(k=j[i],d.relative[l=k.type])break;if((m=d.find[l])&&(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&pb(b.parentNode)||b))){if(j.splice(i,1),a=f.length&&rb(j),!a)return H.apply(e,f),e;break}}}return(n||h(a,o))(f,b,!p,e,ab.test(a)&&pb(b.parentNode)||b),e},c.sortStable=u.split("").sort(B).join("")===u,c.detectDuplicates=!!l,m(),c.sortDetached=jb(function(a){return 1&a.compareDocumentPosition(n.createElement("div"))}),jb(function(a){return a.innerHTML="","#"===a.firstChild.getAttribute("href")})||kb("type|href|height|width",function(a,b,c){return c?void 0:a.getAttribute(b,"type"===b.toLowerCase()?1:2)}),c.attributes&&jb(function(a){return a.innerHTML="",a.firstChild.setAttribute("value",""),""===a.firstChild.getAttribute("value")})||kb("value",function(a,b,c){return c||"input"!==a.nodeName.toLowerCase()?void 0:a.defaultValue}),jb(function(a){return null==a.getAttribute("disabled")})||kb(K,function(a,b,c){var d;return c?void 0:a[b]===!0?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}),"function"==typeof define&&define.amd?define(function(){return gb}):"undefined"!=typeof module&&module.exports?module.exports=gb:a.Sizzle=gb}(window); 3 | //# sourceMappingURL=sizzle.min.map -------------------------------------------------------------------------------- /public/assets/js/table.min.js: -------------------------------------------------------------------------------- 1 | /*! showdown 06-01-2015 */ 2 | !function(){var a=function(a){var b,c={},d="text-align:left;";return c.th=function(a){if(""===a.trim())return"";var b=a.trim().replace(/ /g,"_").toLowerCase();return''+a+""},c.td=function(b){return''+a.makeHtml(b)+""},c.ths=function(){var a="",b=0,d=[].slice.apply(arguments);for(b;b\n",a+="\n"},c.tr=function(){var a,b=[].slice.apply(arguments);return a="\n",a+=c.tds.apply(this,b),a+="\n"},b=function(a){var b,d,e=0,f=a.split("\n"),g=[];for(e;e"),d=b.substring(1,b.length-1).split("|"),h.push(c.thead.apply(this,d)),b=f[++e],b.trim().match(/^[|]{1}[-=| ]+[|]{1}$/)){for(b=f[++e],h.push("");b.trim().match(/^[|]{1}.*[|]{1}$/);)b=b.trim(),h.push(c.tr.apply(this,b.substring(1,b.length-1).split("|"))),b=f[++e];h.push(""),h.push(""),g.push(h.join("\n"));continue}b=f[--e]}g.push(b)}return g.join("\n")},[{type:"lang",filter:b}]};"undefined"!=typeof window&&window.Showdown&&window.Showdown.extensions&&(window.Showdown.extensions.table=a),"undefined"!=typeof module&&(module.exports=a)}(); -------------------------------------------------------------------------------- /public/assets/js/twitter.min.js: -------------------------------------------------------------------------------- 1 | /*! showdown 06-01-2015 */ 2 | !function(){var a=function(){return[{type:"lang",regex:"\\B(\\\\)?@([\\S]+)\\b",replace:function(a,b,c){return"\\"===b?a:'@'+c+""}},{type:"lang",regex:"\\B(\\\\)?#([\\S]+)\\b",replace:function(a,b,c){return"\\"===b?a:'#'+c+""}},{type:"lang",regex:"\\\\@",replace:"@"}]};"undefined"!=typeof window&&window.Showdown&&window.Showdown.extensions&&(window.Showdown.extensions.twitter=a),"undefined"!=typeof module&&(module.exports=a)}(); -------------------------------------------------------------------------------- /public/css/app.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 70px; 3 | margin-bottom: 60px; } 4 | 5 | html { 6 | position: relative; 7 | min-height: 100%; } 8 | 9 | .footer { 10 | position: absolute; 11 | bottom: 0; 12 | width: 100%; 13 | /* Set the fixed height of the footer here */ 14 | height: 60px; 15 | background-color: #f5f5f5; } 16 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ytake/Laravel5.BasicArchitecture/be0fe708dee0a7c6b3e0667f604b9ceacafae978/public/favicon.ico -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 7 | */ 8 | 9 | /* 10 | |-------------------------------------------------------------------------- 11 | | Register The Auto Loader 12 | |-------------------------------------------------------------------------- 13 | | 14 | | Composer provides a convenient, automatically generated class loader for 15 | | our application. We just need to utilize it! We'll simply require it 16 | | into the script here so that we don't have to worry about manual 17 | | loading any of our classes later on. It feels nice to relax. 18 | | 19 | */ 20 | 21 | require __DIR__.'/../bootstrap/autoload.php'; 22 | 23 | /* 24 | |-------------------------------------------------------------------------- 25 | | Turn On The Lights 26 | |-------------------------------------------------------------------------- 27 | | 28 | | We need to illuminate PHP development, so let us turn on the lights. 29 | | This bootstraps the framework and gets it ready for use, then it 30 | | will load up this application so that we can run it and send 31 | | the responses back to the browser and delight our users. 32 | | 33 | */ 34 | 35 | $app = require_once __DIR__.'/../bootstrap/app.php'; 36 | 37 | /* 38 | |-------------------------------------------------------------------------- 39 | | Run The Application 40 | |-------------------------------------------------------------------------- 41 | | 42 | | Once we have the application, we can simply call the run method, 43 | | which will execute the request and send the response back to 44 | | the client's browser allowing them to enjoy the creative 45 | | and wonderful application we have prepared for them. 46 | | 47 | */ 48 | 49 | $kernel = $app->make('Illuminate\Contracts\Http\Kernel'); 50 | 51 | $response = $kernel->handle( 52 | $request = Illuminate\Http\Request::capture() 53 | ); 54 | 55 | $response->send(); 56 | 57 | $kernel->terminate($request, $response); 58 | -------------------------------------------------------------------------------- /public/js/markdown.js: -------------------------------------------------------------------------------- 1 | var converter=new Showdown.converter({extensions:["github"]}),MarkdownEditor=React.createClass({displayName:"MarkdownEditor",getInitialState:function(){return{value:""}},readMarkdown:function(){$.ajax({url:this.props.callUri,dataType:"json",type:"GET",success:function(e){this.setState({value:e.markdown})}.bind(this),error:function(){}.bind(this)})},componentDidMount:function(){this.readMarkdown()},handleChange:function(){var e=this.refs.textarea.getDOMNode().value;this.setState({value:e}),$.ajax({url:this.props.callUri,dataType:"json",type:"POST",headers:{"X-XSRF-TOKEN":$('meta[name="_token"]').attr("content")},data:{markdown:this.state.value},success:function(){}.bind(this),error:function(){}.bind(this)})},render:function(){return React.createElement("div",{className:"MarkdownEditor"},React.createElement("div",{className:"col-lg-6"},React.createElement("h3",null,"Markdown Editor"),React.createElement("textarea",{rows:"20",className:"form-control",onChange:this.handleChange,ref:"textarea",value:this.state.value})),React.createElement("div",{className:"col-lg-6"},React.createElement("h3",null,"Preview"),React.createElement("div",{className:"preview",dangerouslySetInnerHTML:{__html:converter.makeHtml(this.state.value)}})))}});React.renderComponent(React.createElement(MarkdownEditor,{callUri:"/api/v1/markdown"}),document.querySelector(".markdown")); -------------------------------------------------------------------------------- /public/js/todo.js: -------------------------------------------------------------------------------- 1 | var TodoList=React.createClass({displayName:"TodoList",propTypes:{items:React.PropTypes.array},createItem:function(e){return React.createElement("li",null,e.title,1!==e.id&&2!==e.id?React.createElement("a",{href:"#",onClick:this.props.handleDelete.bind(this,e)},React.createElement("i",{className:"mdi-toggle-check-box"})):null)},render:function(){return React.createElement("ul",null,this.props.items.map(this.createItem))}}),ToDoErrors=React.createClass({displayName:"ToDoErrors",render:function(){return React.createElement("div",{className:"alert alert-dismissable alert-warning"},React.createElement("h4",null,"error!"),React.createElement("p",null,this.props.items))}}),TodoApp=React.createClass({displayName:"TodoApp",getInitialState:function(){return{items:[],title:""}},onChange:function(e){this.setState({title:e.target.value})},loadTodoTasks:function(){this.ajaxRequest("GET",this.props.callUri,[])},componentDidMount:function(){this.loadTodoTasks()},handleSubmit:function(e){e.preventDefault(),this.ajaxRequest("POST",this.props.callUri,{title:this.state.title})},ajaxRequest:function(e,t,a){$.ajax({url:t,dataType:"json",type:e,headers:{"X-XSRF-TOKEN":$('meta[name="_token"]').attr("content")},data:a,success:function(e){this.setState({items:e,error:!1,title:""})}.bind(this),error:function(e){this.setState({error:e.responseJSON.title,title:""})}.bind(this)})},handleDelete:function(e,t){t.preventDefault(),this.ajaxRequest("DELETE",this.props.callUri+"/"+e.id,[])},render:function(){return React.createElement("div",null,React.createElement("h3",null,"TODO"),React.createElement(TodoList,{items:this.state.items,handleDelete:this.handleDelete}),this.state.error?React.createElement(ToDoErrors,{items:this.state.error}):null,React.createElement("form",{onSubmit:this.handleSubmit},React.createElement("div",{className:"form-control-wrapper"},React.createElement("input",{onChange:this.onChange,value:this.state.title,className:"form-control empty"})),React.createElement("button",{className:"btn btn-primary"},"Add #"+(this.state.items.length+1))))}});React.renderComponent(React.createElement(TodoApp,{callUri:"/api/v1/todo"}),document.getElementById("todo")); -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /resources/js/react/markdown.jsx: -------------------------------------------------------------------------------- 1 | var converter = new Showdown.converter({ extensions: ['github'] }); 2 | var MarkdownEditor = React.createClass({ 3 | getInitialState: function () { 4 | return { 5 | value: '' 6 | }; 7 | }, 8 | readMarkdown: function() { 9 | $.ajax({ 10 | url: this.props.callUri, 11 | dataType: 'json', 12 | type: 'GET', 13 | success: function(data) { 14 | this.setState( 15 | { 16 | value: data.markdown 17 | } 18 | ); 19 | }.bind(this), 20 | error: function(xhr, status, err) { 21 | 22 | }.bind(this) 23 | }); 24 | }, 25 | componentDidMount: function() { 26 | this.readMarkdown(); 27 | }, 28 | handleChange: function () { 29 | var markdownValue = this.refs.textarea.getDOMNode().value; 30 | this.setState({ 31 | value: markdownValue 32 | }); 33 | $.ajax({ 34 | url: this.props.callUri, 35 | dataType: 'json', 36 | type: 'POST', 37 | headers: { 38 | 'X-XSRF-TOKEN': $('meta[name="_token"]').attr('content') 39 | }, 40 | data: { 41 | markdown: this.state.value 42 | }, 43 | success: function(data) { 44 | 45 | }.bind(this), 46 | error: function(xhr, status, err) { 47 | 48 | }.bind(this) 49 | }); 50 | }, 51 | render: function () { 52 | return ( 53 |
    54 |
    55 |

    Markdown Editor

    56 |