├── public ├── favicon.ico ├── robots.txt ├── .htaccess ├── web.config └── index.php ├── app ├── Listeners │ └── .gitkeep ├── Policies │ └── .gitkeep ├── Events │ └── Event.php ├── Http │ ├── Requests │ │ └── Request.php │ ├── Middleware │ │ ├── EncryptCookies.php │ │ ├── VerifyCsrfToken.php │ │ ├── RedirectIfAuthenticated.php │ │ └── Authenticate.php │ ├── Controllers │ │ ├── Controller.php │ │ └── Auth │ │ │ ├── ResetPasswordController.php │ │ │ ├── ForgotPasswordController.php │ │ │ ├── LoginController.php │ │ │ └── RegisterController.php │ └── Kernel.php ├── Providers │ ├── AppServiceProvider.php │ ├── BroadcastServiceProvider.php │ ├── AuthServiceProvider.php │ ├── EventServiceProvider.php │ └── RouteServiceProvider.php ├── Jobs │ └── Job.php ├── User.php ├── Console │ ├── Commands │ │ └── Inspire.php │ └── Kernel.php └── Exceptions │ └── Handler.php ├── database ├── seeds │ ├── .gitkeep │ └── DatabaseSeeder.php ├── .gitignore ├── migrations │ ├── .gitkeep │ ├── 2014_10_12_100000_create_password_resets_table.php │ └── 2014_10_12_000000_create_users_table.php └── factories │ └── ModelFactory.php ├── resources ├── views │ ├── vendor │ │ └── .gitkeep │ ├── welcome.blade.php │ └── errors │ │ └── 503.blade.php ├── assets │ ├── typescript │ │ ├── app.component.scss │ │ ├── features │ │ │ ├── feature-list │ │ │ │ ├── feature-list.component.scss │ │ │ │ ├── feature-list.component.html │ │ │ │ └── feature-list.component.ts │ │ │ ├── feature │ │ │ │ ├── feature.component.html │ │ │ │ └── feature.component.ts │ │ │ └── shared │ │ │ │ └── feature.service.ts │ │ ├── app.component.html │ │ ├── home │ │ │ ├── home.component.html │ │ │ └── home.component.ts │ │ ├── typings │ │ │ ├── index.d.ts │ │ │ └── globals │ │ │ │ ├── core-js │ │ │ │ └── typings.json │ │ │ │ └── require │ │ │ │ ├── typings.json │ │ │ │ └── index.d.ts │ │ ├── typings.json │ │ ├── main.ts │ │ ├── app.component.ts │ │ ├── vendor.ts │ │ ├── app.routing.ts │ │ └── app.module.ts │ └── sass │ │ └── app.scss └── lang │ └── en │ ├── pagination.php │ ├── auth.php │ ├── passwords.php │ └── validation.php ├── bootstrap ├── cache │ └── .gitignore ├── autoload.php └── app.php ├── storage ├── logs │ └── .gitignore ├── app │ ├── public │ │ └── .gitignore │ └── .gitignore └── framework │ ├── cache │ └── .gitignore │ ├── views │ └── .gitignore │ ├── sessions │ └── .gitignore │ └── .gitignore ├── .gitattributes ├── develop ├── .gitignore ├── install ├── tests ├── ExampleTest.php └── TestCase.php ├── .env.example ├── tsconfig.json ├── routes ├── api.php ├── console.php └── web.php ├── server.php ├── config ├── compile.php ├── services.php ├── view.php ├── broadcasting.php ├── filesystems.php ├── cache.php ├── queue.php ├── auth.php ├── mail.php ├── database.php ├── session.php └── app.php ├── LICENSE ├── phpunit.xml ├── composer.json ├── package.json ├── artisan ├── readme.md └── gulpfile.js /public/favicon.ico: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/Listeners/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /app/Policies/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/seeds/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /database/.gitignore: -------------------------------------------------------------------------------- 1 | *.sqlite 2 | -------------------------------------------------------------------------------- /database/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /resources/views/vendor/.gitkeep: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /bootstrap/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/logs/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: 3 | -------------------------------------------------------------------------------- /storage/app/public/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/app/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !public/ 3 | !.gitignore 4 | -------------------------------------------------------------------------------- /storage/framework/cache/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/views/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /storage/framework/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | !.gitignore 3 | -------------------------------------------------------------------------------- /resources/assets/typescript/app.component.scss: -------------------------------------------------------------------------------- 1 | p { 2 | color: red; 3 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | *.css linguist-vendored 3 | *.scss linguist-vendored 4 | -------------------------------------------------------------------------------- /develop: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | php artisan serve --port 8000 & gulp watch --max_old_space_size=4000 3 | -------------------------------------------------------------------------------- /resources/assets/typescript/features/feature-list/feature-list.component.scss: -------------------------------------------------------------------------------- 1 | li { 2 | font-size: 80%; 3 | } -------------------------------------------------------------------------------- /resources/assets/sass/app.scss: -------------------------------------------------------------------------------- 1 | // @import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap"; 2 | 3 | -------------------------------------------------------------------------------- /app/Events/Event.php: -------------------------------------------------------------------------------- 1 | Laravel5 + Angular2 application

2 | -------------------------------------------------------------------------------- /resources/assets/typescript/home/home.component.html: -------------------------------------------------------------------------------- 1 |

This is Home Component

2 |

Go to features

-------------------------------------------------------------------------------- /resources/assets/typescript/typings/index.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | -------------------------------------------------------------------------------- /storage/framework/.gitignore: -------------------------------------------------------------------------------- 1 | config.php 2 | routes.php 3 | schedule-* 4 | compiled.php 5 | services.json 6 | events.scanned.php 7 | routes.scanned.php 8 | down 9 | -------------------------------------------------------------------------------- /resources/assets/typescript/home/home.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | template: require('./home.component.html') 5 | }) 6 | export class HomeComponent {} -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /node_modules 3 | /public/storage 4 | /public/js 5 | /public/css 6 | /public/build 7 | /nbproject 8 | Homestead.yaml 9 | Homestead.json 10 | .env 11 | .idea 12 | npm-debug.log -------------------------------------------------------------------------------- /install: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | composer install && 3 | cp .env.example .env && 4 | php artisan key:generate && 5 | chmod -R 777 storage && 6 | chmod -R 777 bootstrap/cache && 7 | npm install && 8 | gulp 9 | -------------------------------------------------------------------------------- /app/Http/Requests/Request.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |

-------------------------------------------------------------------------------- /resources/assets/typescript/main.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 4 | import { AppModule } from './app.module'; 5 | platformBrowserDynamic().bootstrapModule(AppModule); -------------------------------------------------------------------------------- /resources/assets/typescript/app.component.ts: -------------------------------------------------------------------------------- 1 | import {Component} from "@angular/core"; 2 | @Component({ 3 | selector: 'my-app', 4 | template: require('./app.component.html'), 5 | styles: [require('./app.component.scss')] 6 | }) 7 | export class AppComponent {} -------------------------------------------------------------------------------- /resources/assets/typescript/features/feature-list/feature-list.component.html: -------------------------------------------------------------------------------- 1 |

Feature list:

2 | 7 |
8 |

Go to homepage

-------------------------------------------------------------------------------- /database/seeds/DatabaseSeeder.php: -------------------------------------------------------------------------------- 1 | call(UsersTableSeeder::class); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /app/Http/Middleware/EncryptCookies.php: -------------------------------------------------------------------------------- 1 | visit('/') 17 | ->see('Laravel 5'); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /resources/assets/typescript/vendor.ts: -------------------------------------------------------------------------------- 1 | import 'core-js/client/shim'; 2 | 3 | import 'es7-reflect-metadata/dist/browser'; 4 | 5 | import 'zone.js/dist/zone'; 6 | import 'zone.js/dist/long-stack-trace-zone'; 7 | 8 | import '@angular/common'; 9 | import '@angular/compiler'; 10 | import '@angular/core'; 11 | import '@angular/forms'; 12 | import '@angular/http'; 13 | import '@angular/platform-browser'; 14 | import '@angular/platform-browser-dynamic'; 15 | import '@angular/router'; 16 | import '@angular/upgrade'; 17 | 18 | import 'rxjs'; 19 | -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- 1 | APP_ENV=local 2 | APP_DEBUG=true 3 | APP_KEY=SomeRandomString 4 | APP_URL=http://localhost 5 | 6 | DB_CONNECTION=mysql 7 | DB_HOST=127.0.0.1 8 | DB_PORT=3306 9 | DB_DATABASE=homestead 10 | DB_USERNAME=homestead 11 | DB_PASSWORD=secret 12 | 13 | CACHE_DRIVER=file 14 | SESSION_DRIVER=file 15 | QUEUE_DRIVER=sync 16 | 17 | REDIS_HOST=127.0.0.1 18 | REDIS_PASSWORD=null 19 | REDIS_PORT=6379 20 | 21 | MAIL_DRIVER=smtp 22 | MAIL_HOST=mailtrap.io 23 | MAIL_PORT=2525 24 | MAIL_USERNAME=null 25 | MAIL_PASSWORD=null 26 | MAIL_ENCRYPTION=null 27 | -------------------------------------------------------------------------------- /app/Providers/AppServiceProvider.php: -------------------------------------------------------------------------------- 1 | user(); 18 | })->middleware('auth:api'); 19 | -------------------------------------------------------------------------------- /app/Jobs/Job.php: -------------------------------------------------------------------------------- 1 | comment(Inspiring::quote()); 18 | })->describe('Display an inspiring quote'); 19 | -------------------------------------------------------------------------------- /app/User.php: -------------------------------------------------------------------------------- 1 | '« Previous', 17 | 'next' => 'Next »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /public/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | 3 | Options -MultiViews 4 | 5 | 6 | RewriteEngine On 7 | 8 | # Redirect Trailing Slashes If Not A Folder... 9 | RewriteCond %{REQUEST_FILENAME} !-d 10 | RewriteRule ^(.*)/$ /$1 [L,R=301] 11 | 12 | # Handle Front Controller... 13 | RewriteCond %{REQUEST_FILENAME} !-d 14 | RewriteCond %{REQUEST_FILENAME} !-f 15 | RewriteRule ^ index.php [L] 16 | 17 | # Handle Authorization Header 18 | RewriteCond %{HTTP:Authorization} . 19 | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 20 | 21 | -------------------------------------------------------------------------------- /tests/TestCase.php: -------------------------------------------------------------------------------- 1 | make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); 22 | 23 | return $app; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /resources/assets/typescript/app.routing.ts: -------------------------------------------------------------------------------- 1 | import { Routes, RouterModule } from '@angular/router'; 2 | import { FeatureListComponent } from './features/feature-list/feature-list.component'; 3 | import { FeatureComponent } from './features/feature/feature.component'; 4 | import { HomeComponent } from './home/home.component'; 5 | 6 | const appRoutes: Routes = [ 7 | { path: '', component: HomeComponent }, 8 | { path: 'features', component: FeatureListComponent }, 9 | { path: 'features/:id', component: FeatureComponent } 10 | ]; 11 | 12 | export const appRoutingProviders: any[] = []; 13 | 14 | export const routing = RouterModule.forRoot(appRoutes); 15 | -------------------------------------------------------------------------------- /server.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | $uri = urldecode( 11 | parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH) 12 | ); 13 | 14 | // This file allows us to emulate Apache's "mod_rewrite" functionality from the 15 | // built-in PHP web server. This provides a convenient way to test a Laravel 16 | // application without having installed a "real" web server software here. 17 | if ($uri !== '/' && file_exists(__DIR__.'/public'.$uri)) { 18 | return false; 19 | } 20 | 21 | require_once __DIR__.'/public/index.php'; 22 | -------------------------------------------------------------------------------- /resources/assets/typescript/features/shared/feature.service.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | 3 | export class Feature { 4 | constructor(public id: number, public description: string) { } 5 | } 6 | 7 | @Injectable() 8 | export class FeatureService { 9 | 10 | private _features: Feature[] = [ 11 | new Feature(1, 'Easy installation via script'), 12 | new Feature(2, 'Bundling with Webpack'), 13 | new Feature(3, 'Require Angular templates and styles external files') 14 | ]; 15 | 16 | getFeatures() { return this._features; } 17 | 18 | getFeature(id: number | string) { 19 | return this._features.find(feature => feature.id === +id); 20 | } 21 | } -------------------------------------------------------------------------------- /app/Http/Middleware/RedirectIfAuthenticated.php: -------------------------------------------------------------------------------- 1 | check()) { 21 | return redirect('/'); 22 | } 23 | 24 | return $next($request); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /app/Providers/BroadcastServiceProvider.php: -------------------------------------------------------------------------------- 1 | id === (int) $userId; 24 | }); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /resources/lang/en/auth.php: -------------------------------------------------------------------------------- 1 | 'These credentials do not match our records.', 17 | 'throttle' => 'Too many login attempts. Please try again in :seconds seconds.', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /app/Providers/AuthServiceProvider.php: -------------------------------------------------------------------------------- 1 | 'App\Policies\ModelPolicy', 17 | ]; 18 | 19 | /** 20 | * Register any authentication / authorization services. 21 | * 22 | * @return void 23 | */ 24 | public function boot() 25 | { 26 | $this->registerPolicies(); 27 | 28 | // 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/factories/ModelFactory.php: -------------------------------------------------------------------------------- 1 | define(App\User::class, function (Faker\Generator $faker) { 15 | return [ 16 | 'name' => $faker->name, 17 | 'email' => $faker->safeEmail, 18 | 'password' => bcrypt(str_random(10)), 19 | 'remember_token' => str_random(10), 20 | ]; 21 | }); 22 | -------------------------------------------------------------------------------- /app/Console/Commands/Inspire.php: -------------------------------------------------------------------------------- 1 | comment(PHP_EOL.Inspiring::quote().PHP_EOL); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /app/Providers/EventServiceProvider.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'App\Listeners\EventListener', 18 | ], 19 | ]; 20 | 21 | /** 22 | * Register any events for your application. 23 | * 24 | * @return void 25 | */ 26 | public function boot() 27 | { 28 | parent::boot(); 29 | 30 | // 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/Console/Kernel.php: -------------------------------------------------------------------------------- 1 | command('inspire') 28 | // ->hourly(); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/Http/Middleware/Authenticate.php: -------------------------------------------------------------------------------- 1 | guest()) { 21 | if ($request->ajax() || $request->wantsJson()) { 22 | return response('Unauthorized.', 401); 23 | } else { 24 | return redirect()->guest('login'); 25 | } 26 | } 27 | 28 | return $next($request); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_100000_create_password_resets_table.php: -------------------------------------------------------------------------------- 1 | string('email')->index(); 17 | $table->string('token')->index(); 18 | $table->timestamp('created_at'); 19 | }); 20 | } 21 | 22 | /** 23 | * Reverse the migrations. 24 | * 25 | * @return void 26 | */ 27 | public function down() 28 | { 29 | Schema::drop('password_resets'); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /resources/views/welcome.blade.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Laravel5 + Angular2 application {{ app('env') }} 6 | @if (App::environment('production')) 7 | 8 | @else 9 | 10 | @endif 11 | 12 | 13 | Loading... 14 | @if (App::environment('production')) 15 | 16 | @else 17 | 18 | 19 | @endif 20 | 21 | 22 | -------------------------------------------------------------------------------- /routes/web.php: -------------------------------------------------------------------------------- 1 | 'api'], function() { 16 | // Route::resource('employees', 'EmployeesController'); 17 | }); 18 | 19 | Auth::routes(); 20 | 21 | // this route is for Angular and it should be placed after all other back end routes 22 | // just keep it at the bottom 23 | Route::get('/{any}', function ($any) { 24 | return view('welcome'); 25 | })->where('any', '.*'); 26 | -------------------------------------------------------------------------------- /resources/lang/en/passwords.php: -------------------------------------------------------------------------------- 1 | 'Passwords must be at least six characters and match the confirmation.', 17 | 'reset' => 'Your password has been reset!', 18 | 'sent' => 'We have e-mailed your password reset link!', 19 | 'token' => 'This password reset token is invalid.', 20 | 'user' => "We can't find a user with that e-mail address.", 21 | 22 | ]; 23 | -------------------------------------------------------------------------------- /database/migrations/2014_10_12_000000_create_users_table.php: -------------------------------------------------------------------------------- 1 | increments('id'); 17 | $table->string('name'); 18 | $table->string('email')->unique(); 19 | $table->string('password'); 20 | $table->rememberToken(); 21 | $table->timestamps(); 22 | }); 23 | } 24 | 25 | /** 26 | * Reverse the migrations. 27 | * 28 | * @return void 29 | */ 30 | public function down() 31 | { 32 | Schema::drop('users'); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /resources/assets/typescript/features/feature/feature.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, OnDestroy } from '@angular/core'; 2 | import { Feature, FeatureService } from '../shared/feature.service'; 3 | import { Router, ActivatedRoute } from '@angular/router'; 4 | import { Subscription } from 'rxjs/Subscription'; 5 | 6 | @Component({ 7 | template: require('./feature.component.html') 8 | }) 9 | export class FeatureComponent implements OnInit { 10 | 11 | feature: Feature; 12 | 13 | private _sub: Subscription; 14 | 15 | constructor( 16 | private _route: ActivatedRoute, 17 | private _router: Router, 18 | private _featureService: FeatureService) {} 19 | 20 | ngOnInit() { 21 | this._sub = this._route.params.subscribe(params => { 22 | let id = +params['id']; // (+) converts string 'id' to a number 23 | this.feature = this._featureService.getFeature(id); 24 | }); 25 | } 26 | 27 | ngOnDestroy() { 28 | this._sub.unsubscribe(); 29 | } 30 | 31 | } -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ResetPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /public/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /resources/assets/typescript/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { BrowserModule } from '@angular/platform-browser'; 3 | import { FormsModule } from '@angular/forms'; 4 | import { routing, appRoutingProviders } from './app.routing'; 5 | import { AppComponent } from './app.component'; 6 | import { FeatureListComponent } from './features/feature-list/feature-list.component'; 7 | import { FeatureComponent } from './features/feature/feature.component'; 8 | import { FeatureService } from './features/shared/feature.service'; 9 | import { HomeComponent } from './home/home.component'; 10 | 11 | @NgModule({ 12 | imports: [ 13 | BrowserModule, 14 | FormsModule, 15 | routing 16 | ], 17 | declarations: [ 18 | AppComponent, 19 | FeatureListComponent, 20 | FeatureComponent, 21 | HomeComponent 22 | ], 23 | providers: [ 24 | appRoutingProviders, 25 | FeatureService 26 | ], 27 | bootstrap: [ 28 | AppComponent 29 | ] 30 | }) 31 | export class AppModule { } -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/ForgotPasswordController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /config/compile.php: -------------------------------------------------------------------------------- 1 | [ 17 | // 18 | ], 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Compiled File Providers 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may list service providers which define a "compiles" function 26 | | that returns additional files that should be compiled, providing an 27 | | easy way to get common files from any packages you are utilizing. 28 | | 29 | */ 30 | 31 | 'providers' => [ 32 | // 33 | ], 34 | 35 | ]; 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2016 Paul Moff 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining 6 | a copy of this software and associated documentation files (the 7 | 'Software'), to deal in the Software without restriction, including 8 | without limitation the rights to use, copy, modify, merge, publish, 9 | distribute, sublicense, and/or sell copies of the Software, and to 10 | permit persons to whom the Software is furnished to do so, subject to 11 | the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be 14 | included in all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY 20 | CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | ./tests 14 | 15 | 16 | 17 | 18 | ./app 19 | 20 | ./app/Http/routes.php 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/LoginController.php: -------------------------------------------------------------------------------- 1 | middleware('guest', ['except' => 'logout']); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /config/services.php: -------------------------------------------------------------------------------- 1 | [ 18 | 'domain' => env('MAILGUN_DOMAIN'), 19 | 'secret' => env('MAILGUN_SECRET'), 20 | ], 21 | 22 | 'ses' => [ 23 | 'key' => env('SES_KEY'), 24 | 'secret' => env('SES_SECRET'), 25 | 'region' => 'us-east-1', 26 | ], 27 | 28 | 'sparkpost' => [ 29 | 'secret' => env('SPARKPOST_SECRET'), 30 | ], 31 | 32 | 'stripe' => [ 33 | 'model' => App\User::class, 34 | 'key' => env('STRIPE_KEY'), 35 | 'secret' => env('STRIPE_SECRET'), 36 | ], 37 | 38 | ]; 39 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /bootstrap/autoload.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Be right back. 5 | 6 | 7 | 8 | 39 | 40 | 41 |
42 |
43 |
Be right back.
44 |
45 |
46 | 47 | 48 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel/laravel", 3 | "description": "The Laravel Framework.", 4 | "keywords": ["framework", "laravel"], 5 | "license": "MIT", 6 | "type": "project", 7 | "require": { 8 | "php": ">=5.6.4", 9 | "laravel/framework": "5.3.*" 10 | }, 11 | "require-dev": { 12 | "fzaninotto/faker": "~1.4", 13 | "mockery/mockery": "0.9.*", 14 | "phpunit/phpunit": "~4.0", 15 | "symfony/css-selector": "2.8.*|3.0.*", 16 | "symfony/dom-crawler": "2.8.*|3.0.*" 17 | }, 18 | "autoload": { 19 | "classmap": [ 20 | "database" 21 | ], 22 | "psr-4": { 23 | "App\\": "app/" 24 | } 25 | }, 26 | "autoload-dev": { 27 | "classmap": [ 28 | "tests/TestCase.php" 29 | ] 30 | }, 31 | "scripts": { 32 | "post-root-package-install": [ 33 | "php -r \"copy('.env.example', '.env');\"" 34 | ], 35 | "post-create-project-cmd": [ 36 | "php artisan key:generate" 37 | ], 38 | "post-install-cmd": [ 39 | "Illuminate\\Foundation\\ComposerScripts::postInstall", 40 | "php artisan optimize" 41 | ], 42 | "post-update-cmd": [ 43 | "Illuminate\\Foundation\\ComposerScripts::postUpdate", 44 | "php artisan optimize" 45 | ] 46 | }, 47 | "config": { 48 | "preferred-install": "dist" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "laravel5-angular2", 3 | "version": "1.0.0", 4 | "scripts": { 5 | "prod": "gulp --production", 6 | "dev": "gulp watch", 7 | "postinstall": "cd resources/assets/typescript && typings install" 8 | }, 9 | "devDependencies": { 10 | "bootstrap-sass": "^3.0.0", 11 | "gulp": "^3.9.1", 12 | "laravel-elixir": "^5.0.0", 13 | "laravel-elixir-webpack-ex": "0.0.5", 14 | "node-sass": "^3.8.0", 15 | "raw-loader": "^0.5.1", 16 | "sass-loader": "^4.0.0", 17 | "ts-loader": "^0.8.2", 18 | "typescript": "^2.0.3", 19 | "typescript-decorate": "^1.0.0", 20 | "typescript-extends": "^1.0.1", 21 | "typescript-metadata": "^1.0.0", 22 | "typescript-param": "^1.0.0", 23 | "typings": "^1.4.0", 24 | "webpack": "^1.13.1" 25 | }, 26 | "dependencies": { 27 | "@angular/common": "~2.1.0", 28 | "@angular/compiler": "~2.1.0", 29 | "@angular/core": "~2.1.0", 30 | "@angular/forms": "~2.1.0", 31 | "@angular/http": "~2.1.0", 32 | "@angular/platform-browser": "~2.1.0", 33 | "@angular/platform-browser-dynamic": "~2.1.0", 34 | "@angular/router": "~3.1.0", 35 | "@angular/upgrade": "~2.1.0", 36 | 37 | "core-js": "^2.4.1", 38 | "reflect-metadata": "^0.1.8", 39 | "rxjs": "5.0.0-beta.12", 40 | "systemjs": "0.19.39", 41 | "zone.js": "^0.6.25", 42 | 43 | "angular-in-memory-web-api": "~0.1.5", 44 | "bootstrap": "^3.3.7", 45 | 46 | "underscore": "^1.8.3", 47 | "es7-reflect-metadata": "^1.6.0" 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /config/broadcasting.php: -------------------------------------------------------------------------------- 1 | env('BROADCAST_DRIVER', 'pusher'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Broadcast Connections 21 | |-------------------------------------------------------------------------- 22 | | 23 | | Here you may define all of the broadcast connections that will be used 24 | | to broadcast events to other systems or over websockets. Samples of 25 | | each available type of connection are provided inside this array. 26 | | 27 | */ 28 | 29 | 'connections' => [ 30 | 31 | 'pusher' => [ 32 | 'driver' => 'pusher', 33 | 'key' => env('PUSHER_KEY'), 34 | 'secret' => env('PUSHER_SECRET'), 35 | 'app_id' => env('PUSHER_APP_ID'), 36 | 'options' => [ 37 | // 38 | ], 39 | ], 40 | 41 | 'redis' => [ 42 | 'driver' => 'redis', 43 | 'connection' => 'default', 44 | ], 45 | 46 | 'log' => [ 47 | 'driver' => 'log', 48 | ], 49 | 50 | ], 51 | 52 | ]; 53 | -------------------------------------------------------------------------------- /bootstrap/app.php: -------------------------------------------------------------------------------- 1 | singleton( 30 | Illuminate\Contracts\Http\Kernel::class, 31 | App\Http\Kernel::class 32 | ); 33 | 34 | $app->singleton( 35 | Illuminate\Contracts\Console\Kernel::class, 36 | App\Console\Kernel::class 37 | ); 38 | 39 | $app->singleton( 40 | Illuminate\Contracts\Debug\ExceptionHandler::class, 41 | App\Exceptions\Handler::class 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 | -------------------------------------------------------------------------------- /artisan: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | make(Illuminate\Contracts\Console\Kernel::class); 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 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # Laravel 5 + Angular 2 boilerplate 2 | 3 | ![alt tag](http://i.imgur.com/3sileJw.png) 4 | 5 | [![license](https://img.shields.io/github/license/mashape/apistatus.svg?maxAge=2592000)](http://opensource.org/licenses/MIT) 6 | 7 | This is a boilerplate for Laravel5 + Angular2 projects. 8 | Webpack is used for bundling assets. 9 | 10 | ## Versions 11 | - Laravel 5.3.9 12 | - Angular 2.0.0 13 | - Webpack 1.13.1 14 | 15 | 16 | ## Requirements 17 | 18 | - PHP >= 5.6.4 19 | - [Composer](https://getcomposer.org/download/) - Package manager for PHP 20 | - [NPM](https://npmjs.org/) - Node package manager 21 | - [Gulp](https://github.com/gulpjs/gulp/blob/master/docs/getting-started.md#getting-started) 22 | 23 | 24 | ## Installation 25 | 26 | - clone repository 27 | - run installer script via `./install` or `bash install` 28 | 29 | > Installer script is a bash script that runs list of commands one-by-one. It is created to simplify installation process. 30 | 31 | At this point you can start developing your app. 32 | 33 | 34 | ## Development 35 | 36 | Run development script via `./develop` or `bash develop`. 37 | 38 | > Development script is a bash script that runs development php server and watches for changes with Gulp and Browsersync. 39 | 40 | 41 | ## Database 42 | 43 | Set proper credentials in `.env` file in order to use database. 44 | 45 | Run migrations via `php artisan migrate`. 46 | 47 | 48 | ## Production 49 | 50 | Run `gulp --production` to merge and minify: 51 | 52 | - JavaScript-files into `all.js` file. 53 | - CSS-files into `all.css` file. 54 | 55 | > Check `resources/views/welcome.blade.php` to see how to use those according to active environment. Don't forget to run `php artisan config:cache` when change environment in `.env` file. 56 | 57 | 58 | ## License 59 | 60 | The repository code is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). 61 | -------------------------------------------------------------------------------- /app/Http/Kernel.php: -------------------------------------------------------------------------------- 1 | [ 27 | \App\Http\Middleware\EncryptCookies::class, 28 | \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, 29 | \Illuminate\Session\Middleware\StartSession::class, 30 | \Illuminate\View\Middleware\ShareErrorsFromSession::class, 31 | \App\Http\Middleware\VerifyCsrfToken::class, 32 | \Illuminate\Routing\Middleware\SubstituteBindings::class, 33 | ], 34 | 35 | 'api' => [ 36 | 'throttle:60,1', 37 | 'bindings', 38 | ], 39 | ]; 40 | 41 | /** 42 | * The application's route middleware. 43 | * 44 | * These middleware may be assigned to groups or used individually. 45 | * 46 | * @var array 47 | */ 48 | protected $routeMiddleware = [ 49 | 'auth' => \App\Http\Middleware\Authenticate::class, 50 | 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 51 | 'can' => \Illuminate\Auth\Middleware\Authorize::class, 52 | 'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 53 | 'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 54 | 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, 55 | ]; 56 | } 57 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | 8 | */ 9 | 10 | /* 11 | |-------------------------------------------------------------------------- 12 | | Register The Auto Loader 13 | |-------------------------------------------------------------------------- 14 | | 15 | | Composer provides a convenient, automatically generated class loader for 16 | | our application. We just need to utilize it! We'll simply require it 17 | | into the script here so that we don't have to worry about manual 18 | | loading any of our classes later on. It feels nice to relax. 19 | | 20 | */ 21 | 22 | require __DIR__.'/../bootstrap/autoload.php'; 23 | 24 | /* 25 | |-------------------------------------------------------------------------- 26 | | Turn On The Lights 27 | |-------------------------------------------------------------------------- 28 | | 29 | | We need to illuminate PHP development, so let us turn on the lights. 30 | | This bootstraps the framework and gets it ready for use, then it 31 | | will load up this application so that we can run it and send 32 | | the responses back to the browser and delight our users. 33 | | 34 | */ 35 | 36 | $app = require_once __DIR__.'/../bootstrap/app.php'; 37 | 38 | /* 39 | |-------------------------------------------------------------------------- 40 | | Run The Application 41 | |-------------------------------------------------------------------------- 42 | | 43 | | Once we have the application, we can handle the incoming request 44 | | through the kernel, and send the associated response back to 45 | | the client's browser allowing them to enjoy the creative 46 | | and wonderful application we have prepared for them. 47 | | 48 | */ 49 | 50 | $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class); 51 | 52 | $response = $kernel->handle( 53 | $request = Illuminate\Http\Request::capture() 54 | ); 55 | 56 | $response->send(); 57 | 58 | $kernel->terminate($request, $response); 59 | -------------------------------------------------------------------------------- /app/Providers/RouteServiceProvider.php: -------------------------------------------------------------------------------- 1 | mapApiRoutes(); 39 | 40 | $this->mapWebRoutes(); 41 | 42 | // 43 | } 44 | 45 | /** 46 | * Define the "web" routes for the application. 47 | * 48 | * These routes all receive session state, CSRF protection, etc. 49 | * 50 | * @return void 51 | */ 52 | protected function mapWebRoutes() 53 | { 54 | Route::group([ 55 | 'middleware' => 'web', 56 | 'namespace' => $this->namespace, 57 | ], function ($router) { 58 | require base_path('routes/web.php'); 59 | }); 60 | } 61 | 62 | /** 63 | * Define the "api" routes for the application. 64 | * 65 | * These routes are typically stateless. 66 | * 67 | * @return void 68 | */ 69 | protected function mapApiRoutes() 70 | { 71 | Route::group([ 72 | 'middleware' => 'api', 73 | 'namespace' => $this->namespace, 74 | 'prefix' => 'api', 75 | ], function ($router) { 76 | require base_path('routes/api.php'); 77 | }); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /app/Exceptions/Handler.php: -------------------------------------------------------------------------------- 1 | expectsJson()) { 61 | return response()->json(['error' => 'Unauthenticated.'], 401); 62 | } 63 | 64 | return redirect()->guest('login'); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /app/Http/Controllers/Auth/RegisterController.php: -------------------------------------------------------------------------------- 1 | middleware('guest'); 40 | } 41 | 42 | /** 43 | * Get a validator for an incoming registration request. 44 | * 45 | * @param array $data 46 | * @return \Illuminate\Contracts\Validation\Validator 47 | */ 48 | protected function validator(array $data) 49 | { 50 | return Validator::make($data, [ 51 | 'name' => 'required|max:255', 52 | 'email' => 'required|email|max:255|unique:users', 53 | 'password' => 'required|min:6|confirmed', 54 | ]); 55 | } 56 | 57 | /** 58 | * Create a new user instance after a valid registration. 59 | * 60 | * @param array $data 61 | * @return User 62 | */ 63 | protected function create(array $data) 64 | { 65 | return User::create([ 66 | 'name' => $data['name'], 67 | 'email' => $data['email'], 68 | 'password' => bcrypt($data['password']), 69 | ]); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /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 | 'public' => [ 52 | 'driver' => 'local', 53 | 'root' => storage_path('app/public'), 54 | 'visibility' => 'public', 55 | ], 56 | 57 | 's3' => [ 58 | 'driver' => 's3', 59 | 'key' => 'your-key', 60 | 'secret' => 'your-secret', 61 | 'region' => 'your-region', 62 | 'bucket' => 'your-bucket', 63 | ], 64 | 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 | 'database' => [ 40 | 'driver' => 'database', 41 | 'table' => 'cache', 42 | 'connection' => null, 43 | ], 44 | 45 | 'file' => [ 46 | 'driver' => 'file', 47 | 'path' => storage_path('framework/cache'), 48 | ], 49 | 50 | 'memcached' => [ 51 | 'driver' => 'memcached', 52 | 'servers' => [ 53 | [ 54 | 'host' => env('MEMCACHED_HOST', '127.0.0.1'), 55 | 'port' => env('MEMCACHED_PORT', 11211), 56 | 'weight' => 100, 57 | ], 58 | ], 59 | ], 60 | 61 | 'redis' => [ 62 | 'driver' => 'redis', 63 | 'connection' => 'default', 64 | ], 65 | 66 | ], 67 | 68 | /* 69 | |-------------------------------------------------------------------------- 70 | | Cache Key Prefix 71 | |-------------------------------------------------------------------------- 72 | | 73 | | When utilizing a RAM based store such as APC or Memcached, there might 74 | | be other applications utilizing the same cache. So, we'll specify a 75 | | value to get prefixed to all our keys so we can avoid collisions. 76 | | 77 | */ 78 | 79 | 'prefix' => 'laravel', 80 | 81 | ]; 82 | -------------------------------------------------------------------------------- /config/queue.php: -------------------------------------------------------------------------------- 1 | env('QUEUE_DRIVER', 'sync'), 19 | 20 | /* 21 | |-------------------------------------------------------------------------- 22 | | Queue Connections 23 | |-------------------------------------------------------------------------- 24 | | 25 | | Here you may configure the connection information for each server that 26 | | is used by your application. A default configuration has been added 27 | | for each back-end shipped with Laravel. You are free to add more. 28 | | 29 | */ 30 | 31 | 'connections' => [ 32 | 33 | 'sync' => [ 34 | 'driver' => 'sync', 35 | ], 36 | 37 | 'database' => [ 38 | 'driver' => 'database', 39 | 'table' => 'jobs', 40 | 'queue' => 'default', 41 | 'retry_after' => 60, 42 | ], 43 | 44 | 'beanstalkd' => [ 45 | 'driver' => 'beanstalkd', 46 | 'host' => 'localhost', 47 | 'queue' => 'default', 48 | 'retry_after' => 60, 49 | ], 50 | 51 | 'sqs' => [ 52 | 'driver' => 'sqs', 53 | 'key' => 'your-public-key', 54 | 'secret' => 'your-secret-key', 55 | 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 56 | 'queue' => 'your-queue-name', 57 | 'region' => 'us-east-1', 58 | ], 59 | 60 | 'redis' => [ 61 | 'driver' => 'redis', 62 | 'connection' => 'default', 63 | 'queue' => 'default', 64 | 'retry_after' => 60, 65 | ], 66 | 67 | ], 68 | 69 | /* 70 | |-------------------------------------------------------------------------- 71 | | Failed Queue Jobs 72 | |-------------------------------------------------------------------------- 73 | | 74 | | These options configure the behavior of failed queue job logging so you 75 | | can control which database and table are used to store the jobs that 76 | | have failed. You may change them to any database / table you wish. 77 | | 78 | */ 79 | 80 | 'failed' => [ 81 | 'database' => env('DB_CONNECTION', 'mysql'), 82 | 'table' => 'failed_jobs', 83 | ], 84 | 85 | ]; 86 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var elixir = require('laravel-elixir'); 2 | var webpack = require('webpack') 3 | require('laravel-elixir-webpack-ex'); 4 | 5 | /* 6 | |-------------------------------------------------------------------------- 7 | | Elixir Asset Management 8 | |-------------------------------------------------------------------------- 9 | | 10 | | Elixir provides a clean, fluent API for defining some basic Gulp tasks 11 | | for your Laravel application. By default, we are compiling the Sass 12 | | file for our application, as well as publishing vendor resources. 13 | | 14 | */ 15 | 16 | elixir(function(mix) { 17 | mix.sass('app.scss'); 18 | 19 | mix.webpack( 20 | { 21 | app: 'main.ts', 22 | vendor: 'vendor.ts' 23 | }, 24 | { 25 | module: { 26 | loaders: [ 27 | { 28 | test: /\.ts$/, 29 | loader: 'ts-loader', 30 | exclude: /node_modules/ 31 | }, 32 | { 33 | test: /\.html$/, 34 | loader: 'raw-loader' 35 | }, 36 | { 37 | test: /\.scss$/, 38 | loaders: ["raw", "sass"] 39 | } 40 | ] 41 | }, 42 | plugins: [ 43 | new webpack.optimize.CommonsChunkPlugin({ 44 | name: 'app', 45 | filename: 'app.js', 46 | minChunks: 5, 47 | chunks: [ 48 | 'app' 49 | ] 50 | }), 51 | new webpack.optimize.CommonsChunkPlugin({ 52 | name: 'vendor', 53 | filename: 'vendor.js', 54 | minChunks: Infinity 55 | }), 56 | new webpack.ProvidePlugin({ 57 | '__decorate': 'typescript-decorate', 58 | '__extends': 'typescript-extends', 59 | '__param': 'typescript-param', 60 | '__metadata': 'typescript-metadata' 61 | }) 62 | ], 63 | resolve: { 64 | extensions: ['', '.js', '.ts'] 65 | }, 66 | debug: true, 67 | devtool: 'source-map' 68 | }, 69 | 'public/js', 70 | 'resources/assets/typescript' 71 | ); 72 | 73 | mix.version([ 74 | 'css/app.css', 75 | 'js/app.js', 76 | 'js/vendor.js', 77 | 'js/all.js', 78 | 'css/all.css' 79 | ]); 80 | 81 | mix.scripts([ 82 | 'vendor.js', 83 | 'app.js' 84 | ], 'public/js/all.js', 'public/js'); 85 | 86 | mix.styles([ 87 | 'app.css' 88 | ], 'public/css/all.css', 'public/css'); 89 | 90 | mix.browserSync({ 91 | files: [ 92 | "public/js/*", 93 | "public/css/*" 94 | ], 95 | proxy: "localhost:8000" 96 | }); 97 | 98 | }); 99 | -------------------------------------------------------------------------------- /config/auth.php: -------------------------------------------------------------------------------- 1 | [ 17 | 'guard' => 'web', 18 | 'passwords' => 'users', 19 | ], 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | Authentication Guards 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Next, you may define every authentication guard for your application. 27 | | Of course, a great default configuration has been defined for you 28 | | here which uses session storage and the Eloquent user provider. 29 | | 30 | | All authentication drivers have a user provider. This defines how the 31 | | users are actually retrieved out of your database or other storage 32 | | mechanisms used by this application to persist your user's data. 33 | | 34 | | Supported: "session", "token" 35 | | 36 | */ 37 | 38 | 'guards' => [ 39 | 'web' => [ 40 | 'driver' => 'session', 41 | 'provider' => 'users', 42 | ], 43 | 44 | 'api' => [ 45 | 'driver' => 'token', 46 | 'provider' => 'users', 47 | ], 48 | ], 49 | 50 | /* 51 | |-------------------------------------------------------------------------- 52 | | User Providers 53 | |-------------------------------------------------------------------------- 54 | | 55 | | All authentication drivers have a user provider. This defines how the 56 | | users are actually retrieved out of your database or other storage 57 | | mechanisms used by this application to persist your user's data. 58 | | 59 | | If you have multiple user tables or models you may configure multiple 60 | | sources which represent each model / table. These sources may then 61 | | be assigned to any extra authentication guards you have defined. 62 | | 63 | | Supported: "database", "eloquent" 64 | | 65 | */ 66 | 67 | 'providers' => [ 68 | 'users' => [ 69 | 'driver' => 'eloquent', 70 | 'model' => App\User::class, 71 | ], 72 | 73 | // 'users' => [ 74 | // 'driver' => 'database', 75 | // 'table' => 'users', 76 | // ], 77 | ], 78 | 79 | /* 80 | |-------------------------------------------------------------------------- 81 | | Resetting Passwords 82 | |-------------------------------------------------------------------------- 83 | | 84 | | Here you may set the options for resetting passwords including the view 85 | | that is your password reset e-mail. You may also set the name of the 86 | | table that maintains all of the reset tokens for your application. 87 | | 88 | | You may specify multiple password reset configurations if you have more 89 | | than one user table or model in the application and you want to have 90 | | separate password reset settings based on the specific user types. 91 | | 92 | | The expire time is the number of minutes that the reset token should be 93 | | considered valid. This security feature keeps tokens short-lived so 94 | | they have less time to be guessed. You may change this as needed. 95 | | 96 | */ 97 | 98 | 'passwords' => [ 99 | 'users' => [ 100 | 'provider' => 'users', 101 | 'email' => 'auth.emails.password', 102 | 'table' => 'password_resets', 103 | 'expire' => 60, 104 | ], 105 | ], 106 | 107 | ]; 108 | -------------------------------------------------------------------------------- /config/mail.php: -------------------------------------------------------------------------------- 1 | env('MAIL_DRIVER', 'smtp'), 20 | 21 | /* 22 | |-------------------------------------------------------------------------- 23 | | SMTP Host Address 24 | |-------------------------------------------------------------------------- 25 | | 26 | | Here you may provide the host address of the SMTP server used by your 27 | | applications. A default option is provided that is compatible with 28 | | the Mailgun mail service which will provide reliable deliveries. 29 | | 30 | */ 31 | 32 | 'host' => env('MAIL_HOST', 'smtp.mailgun.org'), 33 | 34 | /* 35 | |-------------------------------------------------------------------------- 36 | | SMTP Host Port 37 | |-------------------------------------------------------------------------- 38 | | 39 | | This is the SMTP port used by your application to deliver e-mails to 40 | | users of the application. Like the host we have set this value to 41 | | stay compatible with the Mailgun e-mail application by default. 42 | | 43 | */ 44 | 45 | 'port' => env('MAIL_PORT', 587), 46 | 47 | /* 48 | |-------------------------------------------------------------------------- 49 | | Global "From" Address 50 | |-------------------------------------------------------------------------- 51 | | 52 | | You may wish for all e-mails sent by your application to be sent from 53 | | the same address. Here, you may specify a name and address that is 54 | | used globally for all e-mails that are sent by your application. 55 | | 56 | */ 57 | 58 | 'from' => ['address' => null, 'name' => null], 59 | 60 | /* 61 | |-------------------------------------------------------------------------- 62 | | E-Mail Encryption Protocol 63 | |-------------------------------------------------------------------------- 64 | | 65 | | Here you may specify the encryption protocol that should be used when 66 | | the application send e-mail messages. A sensible default using the 67 | | transport layer security protocol should provide great security. 68 | | 69 | */ 70 | 71 | 'encryption' => env('MAIL_ENCRYPTION', 'tls'), 72 | 73 | /* 74 | |-------------------------------------------------------------------------- 75 | | SMTP Server Username 76 | |-------------------------------------------------------------------------- 77 | | 78 | | If your SMTP server requires a username for authentication, you should 79 | | set it here. This will get used to authenticate with your server on 80 | | connection. You may also set the "password" value below this one. 81 | | 82 | */ 83 | 84 | 'username' => env('MAIL_USERNAME'), 85 | 86 | /* 87 | |-------------------------------------------------------------------------- 88 | | SMTP Server Password 89 | |-------------------------------------------------------------------------- 90 | | 91 | | Here you may set the password required by your SMTP server to send out 92 | | messages from your application. This will be given to the server on 93 | | connection so that the application will be able to send messages. 94 | | 95 | */ 96 | 97 | 'password' => env('MAIL_PASSWORD'), 98 | 99 | /* 100 | |-------------------------------------------------------------------------- 101 | | Sendmail System Path 102 | |-------------------------------------------------------------------------- 103 | | 104 | | When using the "sendmail" driver to send e-mails, we will need to know 105 | | the path to where Sendmail lives on this server. A default path has 106 | | been provided here, which will work well on most of your systems. 107 | | 108 | */ 109 | 110 | 'sendmail' => '/usr/sbin/sendmail -bs', 111 | 112 | ]; 113 | -------------------------------------------------------------------------------- /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' => env('DB_CONNECTION', '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' => env('DB_DATABASE', database_path('database.sqlite')), 52 | 'prefix' => '', 53 | ], 54 | 55 | 'mysql' => [ 56 | 'driver' => 'mysql', 57 | 'host' => env('DB_HOST', 'localhost'), 58 | 'port' => env('DB_PORT', '3306'), 59 | 'database' => env('DB_DATABASE', 'forge'), 60 | 'username' => env('DB_USERNAME', 'forge'), 61 | 'password' => env('DB_PASSWORD', ''), 62 | 'charset' => 'utf8', 63 | 'collation' => 'utf8_unicode_ci', 64 | 'prefix' => '', 65 | 'strict' => false, 66 | 'engine' => null, 67 | ], 68 | 69 | 'pgsql' => [ 70 | 'driver' => 'pgsql', 71 | 'host' => env('DB_HOST', 'localhost'), 72 | 'port' => env('DB_PORT', '5432'), 73 | 'database' => env('DB_DATABASE', 'forge'), 74 | 'username' => env('DB_USERNAME', 'forge'), 75 | 'password' => env('DB_PASSWORD', ''), 76 | 'charset' => 'utf8', 77 | 'prefix' => '', 78 | 'schema' => 'public', 79 | ], 80 | 81 | ], 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Migration Repository Table 86 | |-------------------------------------------------------------------------- 87 | | 88 | | This table keeps track of all the migrations that have already run for 89 | | your application. Using this information, we can determine which of 90 | | the migrations on disk haven't actually been run in the database. 91 | | 92 | */ 93 | 94 | 'migrations' => 'migrations', 95 | 96 | /* 97 | |-------------------------------------------------------------------------- 98 | | Redis Databases 99 | |-------------------------------------------------------------------------- 100 | | 101 | | Redis is an open source, fast, and advanced key-value store that also 102 | | provides a richer set of commands than a typical key-value systems 103 | | such as APC or Memcached. Laravel makes it easy to dig right in. 104 | | 105 | */ 106 | 107 | 'redis' => [ 108 | 109 | 'cluster' => false, 110 | 111 | 'default' => [ 112 | 'host' => env('REDIS_HOST', 'localhost'), 113 | 'password' => env('REDIS_PASSWORD', null), 114 | 'port' => env('REDIS_PORT', 6379), 115 | 'database' => 0, 116 | ], 117 | 118 | ], 119 | 120 | ]; 121 | -------------------------------------------------------------------------------- /resources/lang/en/validation.php: -------------------------------------------------------------------------------- 1 | 'The :attribute must be accepted.', 17 | 'active_url' => 'The :attribute is not a valid URL.', 18 | 'after' => 'The :attribute must be a date after :date.', 19 | 'alpha' => 'The :attribute may only contain letters.', 20 | 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.', 21 | 'alpha_num' => 'The :attribute may only contain letters and numbers.', 22 | 'array' => 'The :attribute must be an array.', 23 | 'before' => 'The :attribute must be a date before :date.', 24 | 'between' => [ 25 | 'numeric' => 'The :attribute must be between :min and :max.', 26 | 'file' => 'The :attribute must be between :min and :max kilobytes.', 27 | 'string' => 'The :attribute must be between :min and :max characters.', 28 | 'array' => 'The :attribute must have between :min and :max items.', 29 | ], 30 | 'boolean' => 'The :attribute field must be true or false.', 31 | 'confirmed' => 'The :attribute confirmation does not match.', 32 | 'date' => 'The :attribute is not a valid date.', 33 | 'date_format' => 'The :attribute does not match the format :format.', 34 | 'different' => 'The :attribute and :other must be different.', 35 | 'digits' => 'The :attribute must be :digits digits.', 36 | 'digits_between' => 'The :attribute must be between :min and :max digits.', 37 | 'distinct' => 'The :attribute field has a duplicate value.', 38 | 'email' => 'The :attribute must be a valid email address.', 39 | 'exists' => 'The selected :attribute is invalid.', 40 | 'filled' => 'The :attribute field is required.', 41 | 'image' => 'The :attribute must be an image.', 42 | 'in' => 'The selected :attribute is invalid.', 43 | 'in_array' => 'The :attribute field does not exist in :other.', 44 | 'integer' => 'The :attribute must be an integer.', 45 | 'ip' => 'The :attribute must be a valid IP address.', 46 | 'json' => 'The :attribute must be a valid JSON string.', 47 | 'max' => [ 48 | 'numeric' => 'The :attribute may not be greater than :max.', 49 | 'file' => 'The :attribute may not be greater than :max kilobytes.', 50 | 'string' => 'The :attribute may not be greater than :max characters.', 51 | 'array' => 'The :attribute may not have more than :max items.', 52 | ], 53 | 'mimes' => 'The :attribute must be a file of type: :values.', 54 | 'min' => [ 55 | 'numeric' => 'The :attribute must be at least :min.', 56 | 'file' => 'The :attribute must be at least :min kilobytes.', 57 | 'string' => 'The :attribute must be at least :min characters.', 58 | 'array' => 'The :attribute must have at least :min items.', 59 | ], 60 | 'not_in' => 'The selected :attribute is invalid.', 61 | 'numeric' => 'The :attribute must be a number.', 62 | 'present' => 'The :attribute field must be present.', 63 | 'regex' => 'The :attribute format is invalid.', 64 | 'required' => 'The :attribute field is required.', 65 | 'required_if' => 'The :attribute field is required when :other is :value.', 66 | 'required_unless' => 'The :attribute field is required unless :other is in :values.', 67 | 'required_with' => 'The :attribute field is required when :values is present.', 68 | 'required_with_all' => 'The :attribute field is required when :values is present.', 69 | 'required_without' => 'The :attribute field is required when :values is not present.', 70 | 'required_without_all' => 'The :attribute field is required when none of :values are present.', 71 | 'same' => 'The :attribute and :other must match.', 72 | 'size' => [ 73 | 'numeric' => 'The :attribute must be :size.', 74 | 'file' => 'The :attribute must be :size kilobytes.', 75 | 'string' => 'The :attribute must be :size characters.', 76 | 'array' => 'The :attribute must contain :size items.', 77 | ], 78 | 'string' => 'The :attribute must be a string.', 79 | 'timezone' => 'The :attribute must be a valid zone.', 80 | 'unique' => 'The :attribute has already been taken.', 81 | 'url' => 'The :attribute format is invalid.', 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Custom Validation Language Lines 86 | |-------------------------------------------------------------------------- 87 | | 88 | | Here you may specify custom validation messages for attributes using the 89 | | convention "attribute.rule" to name the lines. This makes it quick to 90 | | specify a specific custom language line for a given attribute rule. 91 | | 92 | */ 93 | 94 | 'custom' => [ 95 | 'attribute-name' => [ 96 | 'rule-name' => 'custom-message', 97 | ], 98 | ], 99 | 100 | /* 101 | |-------------------------------------------------------------------------- 102 | | Custom Validation Attributes 103 | |-------------------------------------------------------------------------- 104 | | 105 | | The following language lines are used to swap attribute place-holders 106 | | with something more reader friendly such as E-Mail Address instead 107 | | of "email". This simply helps us make messages a little cleaner. 108 | | 109 | */ 110 | 111 | 'attributes' => [], 112 | 113 | ]; 114 | -------------------------------------------------------------------------------- /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 | |-------------------------------------------------------------------------- 155 | | HTTP Access Only 156 | |-------------------------------------------------------------------------- 157 | | 158 | | Setting this value to true will prevent JavaScript from accessing the 159 | | value of the cookie and the cookie will only be accessible through 160 | | the HTTP protocol. You are free to modify this option if needed. 161 | | 162 | */ 163 | 164 | 'http_only' => true, 165 | 166 | ]; 167 | -------------------------------------------------------------------------------- /config/app.php: -------------------------------------------------------------------------------- 1 | env('APP_ENV', 'production'), 17 | 18 | /* 19 | |-------------------------------------------------------------------------- 20 | | Application Debug Mode 21 | |-------------------------------------------------------------------------- 22 | | 23 | | When your application is in debug mode, detailed error messages with 24 | | stack traces will be shown on every error that occurs within your 25 | | application. If disabled, a simple generic error page is shown. 26 | | 27 | */ 28 | 29 | 'debug' => env('APP_DEBUG', false), 30 | 31 | /* 32 | |-------------------------------------------------------------------------- 33 | | Application URL 34 | |-------------------------------------------------------------------------- 35 | | 36 | | This URL is used by the console to properly generate URLs when using 37 | | the Artisan command line tool. You should set this to the root of 38 | | your application so that it is used when running Artisan tasks. 39 | | 40 | */ 41 | 42 | 'url' => env('APP_URL', 'http://localhost'), 43 | 44 | /* 45 | |-------------------------------------------------------------------------- 46 | | Application Timezone 47 | |-------------------------------------------------------------------------- 48 | | 49 | | Here you may specify the default timezone for your application, which 50 | | will be used by the PHP date and date-time functions. We have gone 51 | | ahead and set this to a sensible default for you out of the box. 52 | | 53 | */ 54 | 55 | 'timezone' => 'UTC', 56 | 57 | /* 58 | |-------------------------------------------------------------------------- 59 | | Application Locale Configuration 60 | |-------------------------------------------------------------------------- 61 | | 62 | | The application locale determines the default locale that will be used 63 | | by the translation service provider. You are free to set this value 64 | | to any of the locales which will be supported by the application. 65 | | 66 | */ 67 | 68 | 'locale' => 'en', 69 | 70 | /* 71 | |-------------------------------------------------------------------------- 72 | | Application Fallback Locale 73 | |-------------------------------------------------------------------------- 74 | | 75 | | The fallback locale determines the locale to use when the current one 76 | | is not available. You may change the value to correspond to any of 77 | | the language folders that are provided through your application. 78 | | 79 | */ 80 | 81 | 'fallback_locale' => 'en', 82 | 83 | /* 84 | |-------------------------------------------------------------------------- 85 | | Encryption Key 86 | |-------------------------------------------------------------------------- 87 | | 88 | | This key is used by the Illuminate encrypter service and should be set 89 | | to a random, 32 character string, otherwise these encrypted strings 90 | | will not be safe. Please do this before deploying an application! 91 | | 92 | */ 93 | 94 | 'key' => env('APP_KEY'), 95 | 96 | 'cipher' => 'AES-256-CBC', 97 | 98 | /* 99 | |-------------------------------------------------------------------------- 100 | | Logging Configuration 101 | |-------------------------------------------------------------------------- 102 | | 103 | | Here you may configure the log settings for your application. Out of 104 | | the box, Laravel uses the Monolog PHP logging library. This gives 105 | | you a variety of powerful log handlers / formatters to utilize. 106 | | 107 | | Available Settings: "single", "daily", "syslog", "errorlog" 108 | | 109 | */ 110 | 111 | 'log' => env('APP_LOG', 'single'), 112 | 113 | /* 114 | |-------------------------------------------------------------------------- 115 | | Autoloaded Service Providers 116 | |-------------------------------------------------------------------------- 117 | | 118 | | The service providers listed here will be automatically loaded on the 119 | | request to your application. Feel free to add your own services to 120 | | this array to grant expanded functionality to your applications. 121 | | 122 | */ 123 | 124 | 'providers' => [ 125 | 126 | /* 127 | * Laravel Framework Service Providers... 128 | */ 129 | Illuminate\Auth\AuthServiceProvider::class, 130 | Illuminate\Broadcasting\BroadcastServiceProvider::class, 131 | Illuminate\Bus\BusServiceProvider::class, 132 | Illuminate\Cache\CacheServiceProvider::class, 133 | Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, 134 | Illuminate\Cookie\CookieServiceProvider::class, 135 | Illuminate\Database\DatabaseServiceProvider::class, 136 | Illuminate\Encryption\EncryptionServiceProvider::class, 137 | Illuminate\Filesystem\FilesystemServiceProvider::class, 138 | Illuminate\Foundation\Providers\FoundationServiceProvider::class, 139 | Illuminate\Hashing\HashServiceProvider::class, 140 | Illuminate\Mail\MailServiceProvider::class, 141 | Illuminate\Pagination\PaginationServiceProvider::class, 142 | Illuminate\Pipeline\PipelineServiceProvider::class, 143 | Illuminate\Queue\QueueServiceProvider::class, 144 | Illuminate\Redis\RedisServiceProvider::class, 145 | Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, 146 | Illuminate\Session\SessionServiceProvider::class, 147 | Illuminate\Translation\TranslationServiceProvider::class, 148 | Illuminate\Validation\ValidationServiceProvider::class, 149 | Illuminate\View\ViewServiceProvider::class, 150 | Illuminate\Notifications\NotificationServiceProvider::class, 151 | 152 | /* 153 | * Application Service Providers... 154 | */ 155 | App\Providers\AppServiceProvider::class, 156 | App\Providers\AuthServiceProvider::class, 157 | App\Providers\EventServiceProvider::class, 158 | App\Providers\RouteServiceProvider::class, 159 | // App\Providers\BroadcastServiceProvider::class, 160 | 161 | ], 162 | 163 | /* 164 | |-------------------------------------------------------------------------- 165 | | Class Aliases 166 | |-------------------------------------------------------------------------- 167 | | 168 | | This array of class aliases will be registered when this application 169 | | is started. However, feel free to register as many as you wish as 170 | | the aliases are "lazy" loaded so they don't hinder performance. 171 | | 172 | */ 173 | 174 | 'aliases' => [ 175 | 176 | 'App' => Illuminate\Support\Facades\App::class, 177 | 'Artisan' => Illuminate\Support\Facades\Artisan::class, 178 | 'Auth' => Illuminate\Support\Facades\Auth::class, 179 | 'Blade' => Illuminate\Support\Facades\Blade::class, 180 | 'Cache' => Illuminate\Support\Facades\Cache::class, 181 | 'Config' => Illuminate\Support\Facades\Config::class, 182 | 'Cookie' => Illuminate\Support\Facades\Cookie::class, 183 | 'Crypt' => Illuminate\Support\Facades\Crypt::class, 184 | 'DB' => Illuminate\Support\Facades\DB::class, 185 | 'Eloquent' => Illuminate\Database\Eloquent\Model::class, 186 | 'Event' => Illuminate\Support\Facades\Event::class, 187 | 'File' => Illuminate\Support\Facades\File::class, 188 | 'Gate' => Illuminate\Support\Facades\Gate::class, 189 | 'Hash' => Illuminate\Support\Facades\Hash::class, 190 | 'Lang' => Illuminate\Support\Facades\Lang::class, 191 | 'Log' => Illuminate\Support\Facades\Log::class, 192 | 'Mail' => Illuminate\Support\Facades\Mail::class, 193 | 'Password' => Illuminate\Support\Facades\Password::class, 194 | 'Queue' => Illuminate\Support\Facades\Queue::class, 195 | 'Redirect' => Illuminate\Support\Facades\Redirect::class, 196 | 'Redis' => Illuminate\Support\Facades\Redis::class, 197 | 'Request' => Illuminate\Support\Facades\Request::class, 198 | 'Response' => Illuminate\Support\Facades\Response::class, 199 | 'Route' => Illuminate\Support\Facades\Route::class, 200 | 'Schema' => Illuminate\Support\Facades\Schema::class, 201 | 'Session' => Illuminate\Support\Facades\Session::class, 202 | 'Storage' => Illuminate\Support\Facades\Storage::class, 203 | 'URL' => Illuminate\Support\Facades\URL::class, 204 | 'Validator' => Illuminate\Support\Facades\Validator::class, 205 | 'View' => Illuminate\Support\Facades\View::class, 206 | 'Notification' => Illuminate\Support\Facades\Notification::class, 207 | 208 | ], 209 | 210 | ]; 211 | -------------------------------------------------------------------------------- /resources/assets/typescript/typings/globals/require/index.d.ts: -------------------------------------------------------------------------------- 1 | // Generated by typings 2 | // Source: https://raw.githubusercontent.com/DefinitelyTyped/DefinitelyTyped/56295f5058cac7ae458540423c50ac2dcf9fc711/requirejs/require.d.ts 3 | declare module 'module' { 4 | var mod: { 5 | config: () => any; 6 | id: string; 7 | uri: string; 8 | } 9 | export = mod; 10 | } 11 | 12 | interface RequireError extends Error { 13 | 14 | /** 15 | * The error ID that maps to an ID on a web page. 16 | **/ 17 | requireType: string; 18 | 19 | /** 20 | * Required modules. 21 | **/ 22 | requireModules: string[]; 23 | 24 | /** 25 | * The original error, if there is one (might be null). 26 | **/ 27 | originalError: Error; 28 | } 29 | 30 | interface RequireShim { 31 | 32 | /** 33 | * List of dependencies. 34 | **/ 35 | deps?: string[]; 36 | 37 | /** 38 | * Name the module will be exported as. 39 | **/ 40 | exports?: string; 41 | 42 | /** 43 | * Initialize function with all dependcies passed in, 44 | * if the function returns a value then that value is used 45 | * as the module export value instead of the object 46 | * found via the 'exports' string. 47 | * @param dependencies 48 | * @return 49 | **/ 50 | init?: (...dependencies: any[]) => any; 51 | } 52 | 53 | interface RequireConfig { 54 | 55 | // The root path to use for all module lookups. 56 | baseUrl?: string; 57 | 58 | // Path mappings for module names not found directly under 59 | // baseUrl. 60 | paths?: { [key: string]: any; }; 61 | 62 | 63 | // Dictionary of Shim's. 64 | // does not cover case of key->string[] 65 | shim?: { [key: string]: RequireShim; }; 66 | 67 | /** 68 | * For the given module prefix, instead of loading the 69 | * module with the given ID, substitude a different 70 | * module ID. 71 | * 72 | * @example 73 | * requirejs.config({ 74 | * map: { 75 | * 'some/newmodule': { 76 | * 'foo': 'foo1.2' 77 | * }, 78 | * 'some/oldmodule': { 79 | * 'foo': 'foo1.0' 80 | * } 81 | * } 82 | * }); 83 | **/ 84 | map?: { 85 | [id: string]: { 86 | [id: string]: string; 87 | }; 88 | }; 89 | 90 | /** 91 | * Allows pointing multiple module IDs to a module ID that contains a bundle of modules. 92 | * 93 | * @example 94 | * requirejs.config({ 95 | * bundles: { 96 | * 'primary': ['main', 'util', 'text', 'text!template.html'], 97 | * 'secondary': ['text!secondary.html'] 98 | * } 99 | * }); 100 | **/ 101 | bundles?: { [key: string]: string[]; }; 102 | 103 | /** 104 | * AMD configurations, use module.config() to access in 105 | * define() functions 106 | **/ 107 | config?: { [id: string]: {}; }; 108 | 109 | /** 110 | * Configures loading modules from CommonJS packages. 111 | **/ 112 | packages?: {}; 113 | 114 | /** 115 | * The number of seconds to wait before giving up on loading 116 | * a script. The default is 7 seconds. 117 | **/ 118 | waitSeconds?: number; 119 | 120 | /** 121 | * A name to give to a loading context. This allows require.js 122 | * to load multiple versions of modules in a page, as long as 123 | * each top-level require call specifies a unique context string. 124 | **/ 125 | context?: string; 126 | 127 | /** 128 | * An array of dependencies to load. 129 | **/ 130 | deps?: string[]; 131 | 132 | /** 133 | * A function to pass to require that should be require after 134 | * deps have been loaded. 135 | * @param modules 136 | **/ 137 | callback?: (...modules: any[]) => void; 138 | 139 | /** 140 | * If set to true, an error will be thrown if a script loads 141 | * that does not call define() or have shim exports string 142 | * value that can be checked. 143 | **/ 144 | enforceDefine?: boolean; 145 | 146 | /** 147 | * If set to true, document.createElementNS() will be used 148 | * to create script elements. 149 | **/ 150 | xhtml?: boolean; 151 | 152 | /** 153 | * Extra query string arguments appended to URLs that RequireJS 154 | * uses to fetch resources. Most useful to cache bust when 155 | * the browser or server is not configured correctly. 156 | * 157 | * @example 158 | * urlArgs: "bust= + (new Date()).getTime() 159 | **/ 160 | urlArgs?: string; 161 | 162 | /** 163 | * Specify the value for the type="" attribute used for script 164 | * tags inserted into the document by RequireJS. Default is 165 | * "text/javascript". To use Firefox's JavasScript 1.8 166 | * features, use "text/javascript;version=1.8". 167 | **/ 168 | scriptType?: string; 169 | 170 | /** 171 | * If set to true, skips the data-main attribute scanning done 172 | * to start module loading. Useful if RequireJS is embedded in 173 | * a utility library that may interact with other RequireJS 174 | * library on the page, and the embedded version should not do 175 | * data-main loading. 176 | **/ 177 | skipDataMain?: boolean; 178 | 179 | /** 180 | * Allow extending requirejs to support Subresource Integrity 181 | * (SRI). 182 | **/ 183 | onNodeCreated?: (node: HTMLScriptElement, config: RequireConfig, moduleName: string, url: string) => void; 184 | } 185 | 186 | // todo: not sure what to do with this guy 187 | interface RequireModule { 188 | 189 | /** 190 | * 191 | **/ 192 | config(): {}; 193 | 194 | } 195 | 196 | /** 197 | * 198 | **/ 199 | interface RequireMap { 200 | 201 | /** 202 | * 203 | **/ 204 | prefix: string; 205 | 206 | /** 207 | * 208 | **/ 209 | name: string; 210 | 211 | /** 212 | * 213 | **/ 214 | parentMap: RequireMap; 215 | 216 | /** 217 | * 218 | **/ 219 | url: string; 220 | 221 | /** 222 | * 223 | **/ 224 | originalName: string; 225 | 226 | /** 227 | * 228 | **/ 229 | fullName: string; 230 | } 231 | 232 | interface Require { 233 | 234 | /** 235 | * Configure require.js 236 | **/ 237 | config(config: RequireConfig): Require; 238 | 239 | /** 240 | * CommonJS require call 241 | * @param module Module to load 242 | * @return The loaded module 243 | */ 244 | (module: string): any; 245 | 246 | /** 247 | * Start the main app logic. 248 | * Callback is optional. 249 | * Can alternatively use deps and callback. 250 | * @param modules Required modules to load. 251 | **/ 252 | (modules: string[]): void; 253 | 254 | /** 255 | * @see Require() 256 | * @param ready Called when required modules are ready. 257 | **/ 258 | (modules: string[], ready: Function): void; 259 | 260 | /** 261 | * @see http://requirejs.org/docs/api.html#errbacks 262 | * @param ready Called when required modules are ready. 263 | **/ 264 | (modules: string[], ready: Function, errback: Function): void; 265 | 266 | /** 267 | * Generate URLs from require module 268 | * @param module Module to URL 269 | * @return URL string 270 | **/ 271 | toUrl(module: string): string; 272 | 273 | /** 274 | * Returns true if the module has already been loaded and defined. 275 | * @param module Module to check 276 | **/ 277 | defined(module: string): boolean; 278 | 279 | /** 280 | * Returns true if the module has already been requested or is in the process of loading and should be available at some point. 281 | * @param module Module to check 282 | **/ 283 | specified(module: string): boolean; 284 | 285 | /** 286 | * On Error override 287 | * @param err 288 | **/ 289 | onError(err: RequireError, errback?: (err: RequireError) => void): void; 290 | 291 | /** 292 | * Undefine a module 293 | * @param module Module to undefine. 294 | **/ 295 | undef(module: string): void; 296 | 297 | /** 298 | * Semi-private function, overload in special instance of undef() 299 | **/ 300 | onResourceLoad(context: Object, map: RequireMap, depArray: RequireMap[]): void; 301 | } 302 | 303 | interface RequireDefine { 304 | 305 | /** 306 | * Define Simple Name/Value Pairs 307 | * @param config Dictionary of Named/Value pairs for the config. 308 | **/ 309 | (config: { [key: string]: any; }): void; 310 | 311 | /** 312 | * Define function. 313 | * @param func: The function module. 314 | **/ 315 | (func: () => any): void; 316 | 317 | /** 318 | * Define function with dependencies. 319 | * @param deps List of dependencies module IDs. 320 | * @param ready Callback function when the dependencies are loaded. 321 | * callback param deps module dependencies 322 | * callback return module definition 323 | **/ 324 | (deps: string[], ready: Function): void; 325 | 326 | /** 327 | * Define module with simplified CommonJS wrapper. 328 | * @param ready 329 | * callback require requirejs instance 330 | * callback exports exports object 331 | * callback module module 332 | * callback return module definition 333 | **/ 334 | (ready: (require: Require, exports: { [key: string]: any; }, module: RequireModule) => any): void; 335 | 336 | /** 337 | * Define a module with a name and dependencies. 338 | * @param name The name of the module. 339 | * @param deps List of dependencies module IDs. 340 | * @param ready Callback function when the dependencies are loaded. 341 | * callback deps module dependencies 342 | * callback return module definition 343 | **/ 344 | (name: string, deps: string[], ready: Function): void; 345 | 346 | /** 347 | * Define a module with a name. 348 | * @param name The name of the module. 349 | * @param ready Callback function when the dependencies are loaded. 350 | * callback return module definition 351 | **/ 352 | (name: string, ready: Function): void; 353 | 354 | /** 355 | * Used to allow a clear indicator that a global define function (as needed for script src browser loading) conforms 356 | * to the AMD API, any global define function SHOULD have a property called "amd" whose value is an object. 357 | * This helps avoid conflict with any other existing JavaScript code that could have defined a define() function 358 | * that does not conform to the AMD API. 359 | * define.amd.jQuery is specific to jQuery and indicates that the loader is able to account for multiple version 360 | * of jQuery being loaded simultaneously. 361 | */ 362 | amd: Object; 363 | } 364 | 365 | // Ambient declarations for 'require' and 'define' 366 | declare var requirejs: Require; 367 | declare var require: Require; 368 | declare var define: RequireDefine; 369 | --------------------------------------------------------------------------------