Update to laravel 5.3 base

This commit is contained in:
Kevin MacMartin 2016-08-19 16:38:49 -04:00
parent 329027891c
commit 21c62e37e4
56 changed files with 612 additions and 394 deletions

View file

@ -1,37 +1,44 @@
SITE_NAME="Hypothetical Template" SITE_NAME='Hypothetical Template'
SITE_DESC="A website template" SITE_DESC='A website template'
APP_ENV=local APP_ENV=local
APP_DEBUG=true APP_DEBUG=true
APP_KEY=random_string APP_LOG_LEVEL=debug
APP_URL=http://localhost APP_URL=http://localhost
APP_KEY=
CACHE_BUST= CACHE_BUST=
LR_HOST=localhost LR_HOST=localhost
DB_HOST=localhost DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=hypothetical DB_DATABASE=hypothetical
DB_USERNAME=homestead DB_USERNAME=homestead
DB_PASSWORD=secret DB_PASSWORD=secret
COOKIE_NAME=hypothetical CACHE_NAME=hypothetical
CACHE_DRIVER=file CACHE_DRIVER=file
SESSION_DRIVER=file SESSION_DRIVER=file
QUEUE_DRIVER=sync QUEUE_DRIVER=sync
MAILCHIMP_APIKEY= REDIS_HOST=127.0.0.1
MAILCHIMP_LISTID= REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_SENDTO=null
MAIL_DRIVER=smtp MAIL_DRIVER=smtp
MAIL_HOST=null MAIL_HOST=null
MAIL_PORT=587 MAIL_PORT=587
MAIL_ADDRESS=null
MAIL_USERNAME=null MAIL_USERNAME=null
MAIL_PASSWORD=null MAIL_PASSWORD=null
MAIL_ENCRYPTION=tls MAIL_ENCRYPTION=tls
MAIL_SENDFROM=null
MAIL_SENDTO=null
COOKIE_NAME=hypothetical
MAILCHIMP_APIKEY=
MAILCHIMP_LISTID=
REGISTRATION=true REGISTRATION=true

2
.gitattributes vendored
View file

@ -1,3 +1,3 @@
* text=auto * text=auto
*.css linguist-vendored *.css linguist-vendored
*.less linguist-vendored *.scss linguist-vendored

4
.gitignore vendored
View file

@ -1,9 +1,11 @@
/vendor /vendor
/node_modules /node_modules
/bower_components /bower_components
/public/storage
/public/css /public/css
/public/js /public/js
/public/fonts /public/fonts
/public/uploads /public/uploads
/storage/exports /storage/exports
.env /.idea
/.env

View file

@ -1,33 +0,0 @@
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Foundation\Inspiring;
class Inspire extends Command
{
/**
* The name and signature of the console command.
*
* @var string
*/
protected $signature = 'inspire';
/**
* The console command description.
*
* @var string
*/
protected $description = 'Display an inspiring quote';
/**
* Execute the console command.
*
* @return mixed
*/
public function handle()
{
$this->comment(PHP_EOL.Inspiring::quote().PHP_EOL);
}
}

View file

@ -13,7 +13,7 @@ class Kernel extends ConsoleKernel
* @var array * @var array
*/ */
protected $commands = [ protected $commands = [
// Commands\Inspire::class, //
]; ];
/** /**
@ -27,4 +27,14 @@ class Kernel extends ConsoleKernel
// $schedule->command('inspire') // $schedule->command('inspire')
// ->hourly(); // ->hourly();
} }
/**
* Register the Closure based commands for the application.
*
* @return void
*/
protected function commands()
{
require base_path('routes/console.php');
}
} }

View file

@ -1,8 +0,0 @@
<?php
namespace App\Events;
abstract class Event
{
//
}

View file

@ -3,10 +3,7 @@
namespace App\Exceptions; namespace App\Exceptions;
use Exception; use Exception;
use Illuminate\Auth\Access\AuthorizationException; use Illuminate\Auth\AuthenticationException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Illuminate\Foundation\Validation\ValidationException;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
class Handler extends ExceptionHandler class Handler extends ExceptionHandler
@ -17,10 +14,11 @@ class Handler extends ExceptionHandler
* @var array * @var array
*/ */
protected $dontReport = [ protected $dontReport = [
AuthorizationException::class, \Illuminate\Auth\AuthenticationException::class,
HttpException::class, \Illuminate\Auth\Access\AuthorizationException::class,
ModelNotFoundException::class, \Symfony\Component\HttpKernel\Exception\HttpException::class,
ValidationException::class, \Illuminate\Database\Eloquent\ModelNotFoundException::class,
\Illuminate\Validation\ValidationException::class,
]; ];
/** /**
@ -28,23 +26,39 @@ class Handler extends ExceptionHandler
* *
* This is a great spot to send exceptions to Sentry, Bugsnag, etc. * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
* *
* @param \Exception $e * @param \Exception $exception
* @return void * @return void
*/ */
public function report(Exception $e) public function report(Exception $exception)
{ {
parent::report($e); parent::report($exception);
} }
/** /**
* Render an exception into an HTTP response. * Render an exception into an HTTP response.
* *
* @param \Illuminate\Http\Request $request * @param \Illuminate\Http\Request $request
* @param \Exception $e * @param \Exception $exception
* @return \Illuminate\Http\Response * @return \Illuminate\Http\Response
*/ */
public function render($request, Exception $e) public function render($request, Exception $exception)
{ {
return parent::render($request, $e); return parent::render($request, $exception);
}
/**
* Convert an authentication exception into an unauthenticated response.
*
* @param \Illuminate\Http\Request $request
* @param \Illuminate\Auth\AuthenticationException $exception
* @return \Illuminate\Http\Response
*/
protected function unauthenticated($request, AuthenticationException $exception)
{
if ($request->expectsJson()) {
return response()->json(['error' => 'Unauthenticated.'], 401);
}
return redirect()->guest('login');
} }
} }

View file

@ -0,0 +1,32 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\SendsPasswordResetEmails;
class ForgotPasswordController extends Controller
{
/*
|--------------------------------------------------------------------------
| Password Reset Controller
|--------------------------------------------------------------------------
|
| This controller is responsible for handling password reset emails and
| includes a trait which assists in sending these notifications from
| your application to your users. Feel free to explore this trait.
|
*/
use SendsPasswordResetEmails;
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest');
}
}

View file

@ -0,0 +1,39 @@
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\AuthenticatesUsers;
class LoginController extends Controller
{
/*
|--------------------------------------------------------------------------
| Login Controller
|--------------------------------------------------------------------------
|
| This controller handles authenticating users for the application and
| redirecting them to your home screen. The controller uses a trait
| to conveniently provide its functionality to your applications.
|
*/
use AuthenticatesUsers;
/**
* Where to redirect users after login / registration.
*
* @var string
*/
protected $redirectTo = '/';
/**
* Create a new controller instance.
*
* @return void
*/
public function __construct()
{
$this->middleware('guest', [ 'except' => 'logout' ]);
}
}

View file

@ -5,23 +5,22 @@ namespace App\Http\Controllers\Auth;
use App\User; use App\User;
use Validator; use Validator;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ThrottlesLogins; use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Foundation\Auth\AuthenticatesAndRegistersUsers;
class AuthController extends Controller class RegisterController extends Controller
{ {
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Registration & Login Controller | Register Controller
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This controller handles the registration of new users, as well as the | This controller handles the registration of new users as well as their
| authentication of existing users. By default, this controller uses | validation and creation. By default this controller uses a trait to
| a simple trait to add these behaviors. Why don't you explore it? | provide this functionality without requiring any additional code.
| |
*/ */
use AuthenticatesAndRegistersUsers, ThrottlesLogins; use RegistersUsers;
/** /**
* Where to redirect users after login / registration. * Where to redirect users after login / registration.
@ -31,13 +30,45 @@ class AuthController extends Controller
protected $redirectTo = '/dashboard'; protected $redirectTo = '/dashboard';
/** /**
* Create a new authentication controller instance. * Create a new controller instance.
* *
* @return void * @return void
*/ */
public function __construct() public function __construct()
{ {
$this->middleware('guest', ['except' => 'logout']); $this->middleware('guest');
}
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6|confirmed',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
if (env('REGISTRATION', false)) {
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
} }
/** /**
@ -53,36 +84,4 @@ class AuthController extends Controller
header('Location: /login'); header('Location: /login');
} }
} }
/**
* Get a validator for an incoming registration request.
*
* @param array $data
* @return \Illuminate\Contracts\Validation\Validator
*/
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|confirmed|min:6',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
if (env('REGISTRATION', false)) {
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
}
} }

View file

@ -5,7 +5,7 @@ namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\ResetsPasswords; use Illuminate\Foundation\Auth\ResetsPasswords;
class PasswordController extends Controller class ResetPasswordController extends Controller
{ {
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -21,14 +21,7 @@ class PasswordController extends Controller
use ResetsPasswords; use ResetsPasswords;
/** /**
* Where to redirect users after login / registration. * Create a new controller instance.
*
* @var string
*/
protected $redirectTo = '/dashboard';
/**
* Create a new password controller instance.
* *
* @return void * @return void
*/ */

View file

@ -27,7 +27,7 @@ class ContactController extends Controller {
// Send the email if the MAIL_SENDTO variable is set // Send the email if the MAIL_SENDTO variable is set
if (env('MAIL_SENDTO') != null) { if (env('MAIL_SENDTO') != null) {
Mail::send('email.contact', [ 'contact' => $contact ], function($mail) use ($contact) { Mail::send('email.contact', [ 'contact' => $contact ], function($mail) use ($contact) {
$mail->from(env('MAIL_ADDRESS'), env('SITE_NAME')) $mail->from(env('MAIL_SENDFROM'), env('SITE_NAME'))
->to(env('MAIL_SENDTO')) ->to(env('MAIL_SENDTO'))
->subject('Contact form submission'); ->subject('Contact form submission');
}); });

View file

@ -29,10 +29,12 @@ class Kernel extends HttpKernel
\Illuminate\Session\Middleware\StartSession::class, \Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class, \Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\VerifyCsrfToken::class, \App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
], ],
'api' => [ 'api' => [
'throttle:60,1', 'throttle:60,1',
'bindings',
], ],
]; ];
@ -44,9 +46,11 @@ class Kernel extends HttpKernel
* @var array * @var array
*/ */
protected $routeMiddleware = [ protected $routeMiddleware = [
'auth' => \App\Http\Middleware\Authenticate::class, 'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, 'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, 'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, 'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
]; ];
} }

View file

@ -1,30 +0,0 @@
<?php
namespace App\Http\Middleware;
use Closure;
use Illuminate\Support\Facades\Auth;
class Authenticate
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->guest()) {
if ($request->ajax()) {
return response('Unauthorized.', 401);
} else {
return redirect()->guest('/login');
}
}
return $next($request);
}
}

View file

@ -1,10 +0,0 @@
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
abstract class Request extends FormRequest
{
//
}

View file

@ -1,47 +0,0 @@
<?php
Route::group(['middleware' => 'web'], function () {
/*
|--------------------------------------------------------------------------
| Public Routes
|--------------------------------------------------------------------------
*/
Route::get('/', function() {
Head::setTitle('Home');
return view('website.index');
});
Route::get('/contact', function() {
Head::setTitle('Contact');
return view('website.contact');
});
/*
|--------------------------------------------------------------------------
| Post Routes
|--------------------------------------------------------------------------
*/
Route::post('/contact-submit', 'ContactController@postContactSubmit');
Route::post('/subscription-submit', 'SubscriptionController@postSubscriptionSubmit');
/*
|--------------------------------------------------------------------------
| Authentication Routes
|--------------------------------------------------------------------------
*/
Route::auth();
/*
|--------------------------------------------------------------------------
| Dashboard Routes
|--------------------------------------------------------------------------
*/
Route::group(['prefix' => 'dashboard'], function() {
Route::get('/', 'DashboardController@index');
Route::controller('', DashboardController::class);
});
});

View file

@ -1,21 +0,0 @@
<?php
namespace App\Jobs;
use Illuminate\Bus\Queueable;
abstract class Job
{
/*
|--------------------------------------------------------------------------
| Queueable Jobs
|--------------------------------------------------------------------------
|
| This job base class provides a central location to place any logic that
| is shared across all of your jobs. The trait included with the class
| provides access to the "queueOn" and "delay" queue helper methods.
|
*/
use Queueable;
}

View file

View file

@ -0,0 +1,30 @@
<?php
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
{
/**
* The policy mappings for the application.
*
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
];
/**
* Register any authentication / authorization services.
*
* @return void
*/
public function boot()
{
$this->registerPolicies();
//
}
}

View file

@ -0,0 +1,26 @@
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
class BroadcastServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*
* @return void
*/
public function boot()
{
Broadcast::routes();
/*
* Authenticate the user's personal channel...
*/
Broadcast::channel('App.User.*', function ($user, $userId) {
return (int) $user->id === (int) $userId;
});
}
}

View file

@ -2,7 +2,7 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Contracts\Events\Dispatcher as DispatcherContract; use Illuminate\Support\Facades\Event;
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider;
class EventServiceProvider extends ServiceProvider class EventServiceProvider extends ServiceProvider
@ -19,14 +19,13 @@ class EventServiceProvider extends ServiceProvider
]; ];
/** /**
* Register any other events for your application. * Register any events for your application.
* *
* @param \Illuminate\Contracts\Events\Dispatcher $events
* @return void * @return void
*/ */
public function boot(DispatcherContract $events) public function boot()
{ {
parent::boot($events); parent::boot();
// //
} }

View file

@ -2,13 +2,13 @@
namespace App\Providers; namespace App\Providers;
use Illuminate\Routing\Router; use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
class RouteServiceProvider extends ServiceProvider class RouteServiceProvider extends ServiceProvider
{ {
/** /**
* This namespace is applied to the controller routes in your routes file. * This namespace is applied to your controller routes.
* *
* In addition, it is set as the URL generator's root namespace. * In addition, it is set as the URL generator's root namespace.
* *
@ -19,26 +19,61 @@ class RouteServiceProvider extends ServiceProvider
/** /**
* Define your route model bindings, pattern filters, etc. * Define your route model bindings, pattern filters, etc.
* *
* @param \Illuminate\Routing\Router $router
* @return void * @return void
*/ */
public function boot(Router $router) public function boot()
{ {
// //
parent::boot($router); parent::boot();
} }
/** /**
* Define the routes for the application. * Define the routes for the application.
* *
* @param \Illuminate\Routing\Router $router
* @return void * @return void
*/ */
public function map(Router $router) public function map()
{ {
$router->group(['namespace' => $this->namespace], function ($router) { $this->mapWebRoutes();
require app_path('Http/routes.php');
$this->mapApiRoutes();
//
}
/**
* Define the "web" routes for the application.
*
* These routes all receive session state, CSRF protection, etc.
*
* @return void
*/
protected function mapWebRoutes()
{
Route::group([
'middleware' => 'web',
'namespace' => $this->namespace,
], function ($router) {
require base_path('routes/web.php');
});
}
/**
* Define the "api" routes for the application.
*
* These routes are typically stateless.
*
* @return void
*/
protected function mapApiRoutes()
{
Route::group([
'middleware' => ['api', 'auth:api'],
'namespace' => $this->namespace,
'prefix' => 'api',
], function ($router) {
require base_path('routes/api.php');
}); });
} }
} }

View file

@ -1,8 +1,13 @@
<?php namespace App; <?php
namespace App;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable; use Illuminate\Foundation\Auth\User as Authenticatable;
class User extends Authenticatable { class User extends Authenticatable
{
use Notifiable;
/** /**
* The attributes that are mass assignable. * The attributes that are mass assignable.
@ -14,12 +19,11 @@ class User extends Authenticatable {
]; ];
/** /**
* The attributes excluded from the model's JSON form. * The attributes that should be hidden for arrays.
* *
* @var array * @var array
*/ */
protected $hidden = [ protected $hidden = [
'password', 'remember_token', 'password', 'remember_token',
]; ];
} }

View file

@ -5,8 +5,8 @@
"license": "MIT", "license": "MIT",
"type": "project", "type": "project",
"require": { "require": {
"php": ">=5.5.9", "php": ">=5.6.4",
"laravel/framework": "5.2.*", "laravel/framework": "5.3.*",
"radic/blade-extensions": "~6.2", "radic/blade-extensions": "~6.2",
"erusev/parsedown": "~1.5", "erusev/parsedown": "~1.5",
"gwnobots/laravel-head": "dev-master", "gwnobots/laravel-head": "dev-master",
@ -17,9 +17,9 @@
"require-dev": { "require-dev": {
"fzaninotto/faker": "~1.4", "fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*", "mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0", "phpunit/phpunit": "~5.0",
"symfony/css-selector": "2.8.*|3.0.*", "symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "2.8.*|3.0.*" "symfony/dom-crawler": "3.1.*"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [
@ -36,21 +36,23 @@
}, },
"scripts": { "scripts": {
"post-root-package-install": [ "post-root-package-install": [
"php -r \"copy('.env.example', '.env');\"" "php -r \"file_exists('.env') || copy('.env.example', '.env');\""
], ],
"post-create-project-cmd": [ "post-create-project-cmd": [
"php artisan key:generate" "php artisan key:generate"
], ],
"post-install-cmd": [ "post-install-cmd": [
"php artisan clear-compiled", "Illuminate\\Foundation\\ComposerScripts::postInstall",
"php artisan optimize" "php artisan optimize"
], ],
"post-update-cmd": [ "post-update-cmd": [
"php artisan clear-compiled", "Illuminate\\Foundation\\ComposerScripts::postUpdate",
"php artisan optimize" "php artisan optimize"
] ]
}, },
"config": { "config": {
"preferred-install": "dist" "preferred-install": "dist"
} },
"minimum-stability": "dev",
"prefer-stable": true
} }

View file

@ -2,6 +2,18 @@
return [ return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
*/
'name' => env('SITE_NAME', 'My Application'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Environment | Application Environment
@ -110,6 +122,8 @@ return [
'log' => 'single', 'log' => 'single',
'log_level' => env('APP_LOG_LEVEL', 'debug'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Autoloaded Service Providers | Autoloaded Service Providers
@ -138,6 +152,7 @@ return [
Illuminate\Foundation\Providers\FoundationServiceProvider::class, Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class, Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class, Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class, Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class, Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class, Illuminate\Queue\QueueServiceProvider::class,
@ -148,10 +163,15 @@ return [
Illuminate\Validation\ValidationServiceProvider::class, Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class, Illuminate\View\ViewServiceProvider::class,
/*
* Package Service Providers...
*/
/* /*
* Application Service Providers... * Application Service Providers...
*/ */
App\Providers\AppServiceProvider::class, App\Providers\AppServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class, App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class, App\Providers\RouteServiceProvider::class,
@ -179,35 +199,37 @@ return [
'aliases' => [ 'aliases' => [
'App' => Illuminate\Support\Facades\App::class, 'App' => Illuminate\Support\Facades\App::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class, 'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class, 'Blade' => Illuminate\Support\Facades\Blade::class,
'Cache' => Illuminate\Support\Facades\Cache::class, 'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class, 'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class, 'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class, 'Crypt' => Illuminate\Support\Facades\Crypt::class,
'DB' => Illuminate\Support\Facades\DB::class, 'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class, 'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class, 'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class, 'File' => Illuminate\Support\Facades\File::class,
'Hash' => Illuminate\Support\Facades\Hash::class, 'Gate' => Illuminate\Support\Facades\Gate::class,
'Lang' => Illuminate\Support\Facades\Lang::class, 'Hash' => Illuminate\Support\Facades\Hash::class,
'Log' => Illuminate\Support\Facades\Log::class, 'Lang' => Illuminate\Support\Facades\Lang::class,
'Mail' => Illuminate\Support\Facades\Mail::class, 'Log' => Illuminate\Support\Facades\Log::class,
'Password' => Illuminate\Support\Facades\Password::class, 'Mail' => Illuminate\Support\Facades\Mail::class,
'Queue' => Illuminate\Support\Facades\Queue::class, 'Notification' => Illuminate\Support\Facades\Notification::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class, 'Password' => Illuminate\Support\Facades\Password::class,
'Redis' => Illuminate\Support\Facades\Redis::class, 'Queue' => Illuminate\Support\Facades\Queue::class,
'Request' => Illuminate\Support\Facades\Request::class, 'Redirect' => Illuminate\Support\Facades\Redirect::class,
'Response' => Illuminate\Support\Facades\Response::class, 'Redis' => Illuminate\Support\Facades\Redis::class,
'Route' => Illuminate\Support\Facades\Route::class, 'Request' => Illuminate\Support\Facades\Request::class,
'Schema' => Illuminate\Support\Facades\Schema::class, 'Response' => Illuminate\Support\Facades\Response::class,
'Session' => Illuminate\Support\Facades\Session::class, 'Route' => Illuminate\Support\Facades\Route::class,
'Storage' => Illuminate\Support\Facades\Storage::class, 'Schema' => Illuminate\Support\Facades\Schema::class,
'URL' => Illuminate\Support\Facades\URL::class, 'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class, 'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class, 'View' => Illuminate\Support\Facades\View::class,
/* /*
* Custom Class Aliases... * Custom Class Aliases...

View file

@ -98,7 +98,6 @@ return [
'passwords' => [ 'passwords' => [
'users' => [ 'users' => [
'provider' => 'users', 'provider' => 'users',
'email' => 'auth.emails.password',
'table' => 'password_resets', 'table' => 'password_resets',
'expire' => 60, 'expire' => 60,
], ],

View file

@ -11,9 +11,11 @@ return [
| framework when an event needs to be broadcast. You may set this to | framework when an event needs to be broadcast. You may set this to
| any of the connections defined in the "connections" array below. | any of the connections defined in the "connections" array below.
| |
| Supported: "pusher", "redis", "log", "null"
|
*/ */
'default' => env('BROADCAST_DRIVER', 'pusher'), 'default' => env('BROADCAST_DRIVER', 'null'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -33,6 +35,9 @@ return [
'key' => env('PUSHER_KEY'), 'key' => env('PUSHER_KEY'),
'secret' => env('PUSHER_SECRET'), 'secret' => env('PUSHER_SECRET'),
'app_id' => env('PUSHER_APP_ID'), 'app_id' => env('PUSHER_APP_ID'),
'options' => [
//
],
], ],
'redis' => [ 'redis' => [
@ -44,6 +49,10 @@ return [
'driver' => 'log', 'driver' => 'log',
], ],
'null' => [
'driver' => 'null',
],
], ],
]; ];

View file

@ -11,6 +11,8 @@ return [
| using this caching library. This connection is used when another is | using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function. | not explicitly specified when executing a given caching function.
| |
| Supported: "apc", "array", "database", "file", "memcached", "redis"
|
*/ */
'default' => env('CACHE_DRIVER', 'file'), 'default' => env('CACHE_DRIVER', 'file'),
@ -38,20 +40,30 @@ return [
'database' => [ 'database' => [
'driver' => 'database', 'driver' => 'database',
'table' => 'cache', 'table' => 'cache',
'connection' => null, 'connection' => null,
], ],
'file' => [ 'file' => [
'driver' => 'file', 'driver' => 'file',
'path' => storage_path('framework/cache'), 'path' => storage_path('framework/cache'),
], ],
'memcached' => [ 'memcached' => [
'driver' => 'memcached', 'driver' => 'memcached',
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'),
'sasl' => [
env('MEMCACHED_USERNAME'),
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [ 'servers' => [
[ [
'host' => '127.0.0.1', 'port' => 11211, 'weight' => 100, 'host' => env('MEMCACHED_HOST', '127.0.0.1'),
'port' => env('MEMCACHED_PORT', 11211),
'weight' => 100,
], ],
], ],
], ],
@ -74,6 +86,6 @@ return [
| |
*/ */
'prefix' => 'laravel', 'prefix' => env('CACHE_NAME', 'laravel'),
]; ];

View file

@ -13,7 +13,7 @@ return [
| |
*/ */
'fetch' => PDO::FETCH_CLASS, 'fetch' => PDO::FETCH_OBJ,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -47,42 +47,36 @@ return [
'connections' => [ 'connections' => [
'sqlite' => [ 'sqlite' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'database' => storage_path('database.sqlite'), 'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '', 'prefix' => '',
], ],
'mysql' => [ 'mysql' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'), 'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'), 'port' => env('DB_PORT', '3306'),
'username' => env('DB_USERNAME', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
'password' => env('DB_PASSWORD', ''), 'username' => env('DB_USERNAME', 'forge'),
'charset' => 'utf8', 'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci', 'collation' => 'utf8_unicode_ci',
'prefix' => '', 'prefix' => '',
'strict' => false, 'strict' => true,
'engine' => null,
], ],
'pgsql' => [ 'pgsql' => [
'driver' => 'pgsql', 'driver' => 'pgsql',
'host' => env('DB_HOST', 'localhost'), 'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'), 'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8', 'charset' => 'utf8',
'prefix' => '', 'prefix' => '',
'schema' => 'public', 'schema' => 'public',
], 'sslmode' => 'prefer',
'sqlsrv' => [
'driver' => 'sqlsrv',
'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
], ],
], ],
@ -116,8 +110,9 @@ return [
'cluster' => false, 'cluster' => false,
'default' => [ 'default' => [
'host' => '127.0.0.1', 'host' => env('REDIS_HOST', 'localhost'),
'port' => 6379, 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0, 'database' => 0,
], ],

View file

@ -45,41 +45,23 @@ return [
'local' => [ 'local' => [
'driver' => 'local', 'driver' => 'local',
'root' => storage_path('app'), 'root' => storage_path('app'),
], ],
'ftp' => [ 'public' => [
'driver' => 'ftp', 'driver' => 'local',
'host' => 'ftp.example.com', 'root' => storage_path('app/public'),
'username' => 'your-username', 'visibility' => 'public',
'password' => 'your-password',
// Optional FTP Settings...
// 'port' => 21,
// 'root' => '',
// 'passive' => true,
// 'ssl' => true,
// 'timeout' => 30,
], ],
's3' => [ 's3' => [
'driver' => 's3', 'driver' => 's3',
'key' => 'your-key', 'key' => 'your-key',
'secret' => 'your-secret', 'secret' => 'your-secret',
'region' => 'your-region', 'region' => 'your-region',
'bucket' => 'your-bucket', 'bucket' => 'your-bucket',
], ],
'rackspace' => [
'driver' => 'rackspace',
'username' => 'your-username',
'key' => 'your-key',
'container' => 'your-container',
'endpoint' => 'https://identity.api.rackspacecloud.com/v2.0/',
'region' => 'IAD',
'url_type' => 'publicURL',
],
], ],
]; ];

View file

@ -11,7 +11,8 @@ return [
| sending of e-mail. You may specify which one you're using throughout | sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail. | your application here. By default, Laravel is setup for SMTP mail.
| |
| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "ses", "log" | Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill",
| "ses", "sparkpost", "log"
| |
*/ */
@ -54,7 +55,10 @@ return [
| |
*/ */
'from' => ['address' => env('MAIL_ADDRESS', null), 'name' => env('SITE_NAME', null)], 'from' => [
'address' => env('MAIL_SENDFROM', null),
'name' => env('SITE_NAME', null),
],
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------

View file

@ -11,8 +11,7 @@ return [
| API, giving you convenient access to each back-end using the same | API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver. | syntax for each one. Here you may set the default queue driver.
| |
| Supported: "null", "sync", "database", "beanstalkd", | Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
| "sqs", "redis"
| |
*/ */
@ -39,30 +38,30 @@ return [
'driver' => 'database', 'driver' => 'database',
'table' => 'jobs', 'table' => 'jobs',
'queue' => 'default', 'queue' => 'default',
'expire' => 60, 'retry_after' => 90,
], ],
'beanstalkd' => [ 'beanstalkd' => [
'driver' => 'beanstalkd', 'driver' => 'beanstalkd',
'host' => 'localhost', 'host' => 'localhost',
'queue' => 'default', 'queue' => 'default',
'ttr' => 60, 'retry_after' => 90,
], ],
'sqs' => [ 'sqs' => [
'driver' => 'sqs', 'driver' => 'sqs',
'key' => 'your-public-key', 'key' => 'your-public-key',
'secret' => 'your-secret-key', 'secret' => 'your-secret-key',
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
'queue' => 'your-queue-name', 'queue' => 'your-queue-name',
'region' => 'us-east-1', 'region' => 'us-east-1',
], ],
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'connection' => 'default', 'connection' => 'default',
'queue' => 'default', 'queue' => 'default',
'expire' => 60, 'retry_after' => 90,
], ],
], ],
@ -79,7 +78,8 @@ return [
*/ */
'failed' => [ 'failed' => [
'database' => 'mysql', 'table' => 'failed_jobs', 'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs',
], ],
]; ];

View file

@ -8,31 +8,31 @@ return [
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This file is for storing the credentials for third party services such | This file is for storing the credentials for third party services such
| as Stripe, Mailgun, Mandrill, and others. This file provides a sane | as Stripe, Mailgun, SparkPost and others. This file provides a sane
| default location for this type of information, allowing packages | default location for this type of information, allowing packages
| to have a conventional place to find your various credentials. | to have a conventional place to find your various credentials.
| |
*/ */
'mailgun' => [ 'mailgun' => [
'domain' => '', 'domain' => env('MAILGUN_DOMAIN'),
'secret' => '', 'secret' => env('MAILGUN_SECRET'),
],
'mandrill' => [
'secret' => '',
], ],
'ses' => [ 'ses' => [
'key' => '', 'key' => env('SES_KEY'),
'secret' => '', 'secret' => env('SES_SECRET'),
'region' => 'us-east-1', 'region' => 'us-east-1',
], ],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [ 'stripe' => [
'model' => App\User::class, 'model' => App\User::class,
'key' => '', 'key' => env('STRIPE_KEY'),
'secret' => '', 'secret' => env('STRIPE_SECRET'),
], ],
]; ];

View file

@ -85,6 +85,19 @@ return [
'table' => 'sessions', 'table' => 'sessions',
/*
|--------------------------------------------------------------------------
| Session Cache Store
|--------------------------------------------------------------------------
|
| When using the "apc" or "memcached" session drivers, you may specify a
| cache store that should be used for these sessions. This value must
| correspond with one of the application's configured cache stores.
|
*/
'store' => null,
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Session Sweeping Lottery | Session Sweeping Lottery
@ -135,7 +148,7 @@ return [
| |
*/ */
'domain' => null, 'domain' => env('SESSION_DOMAIN', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -150,4 +163,17 @@ return [
'secure' => false, 'secure' => false,
/*
|--------------------------------------------------------------------------
| HTTP Access Only
|--------------------------------------------------------------------------
|
| Setting this value to true will prevent JavaScript from accessing the
| value of the cookie and the cookie will only be accessible through
| the HTTP protocol. You are free to modify this option if needed.
|
*/
'http_only' => false,
]; ];

View file

@ -11,11 +11,11 @@
| |
*/ */
$factory->define(App\User::class, function ($faker) { $factory->define(App\User::class, function (Faker\Generator $faker) {
return [ return [
'name' => $faker->name, 'name' => $faker->name,
'email' => $faker->email, 'email' => $faker->safeEmail,
'password' => str_random(10), 'password' => bcrypt(str_random(10)),
'remember_token' => str_random(10), 'remember_token' => str_random(10),
]; ];
}); });

View file

@ -1,5 +1,6 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
@ -16,7 +17,7 @@ class CreateUsersTable extends Migration
$table->increments('id'); $table->increments('id');
$table->string('name'); $table->string('name');
$table->string('email')->unique(); $table->string('email')->unique();
$table->string('password', 60); $table->string('password');
$table->rememberToken(); $table->rememberToken();
$table->timestamps(); $table->timestamps();
}); });

View file

@ -1,5 +1,6 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
@ -15,7 +16,7 @@ class CreatePasswordResetsTable extends Migration
Schema::create('password_resets', function (Blueprint $table) { Schema::create('password_resets', function (Blueprint $table) {
$table->string('email')->index(); $table->string('email')->index();
$table->string('token')->index(); $table->string('token')->index();
$table->timestamp('created_at'); $table->timestamp('created_at')->nullable();
}); });
} }

View file

@ -1,5 +1,6 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;

View file

@ -1,5 +1,6 @@
<?php <?php
use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;

View file

@ -1,5 +1,9 @@
{ {
"private": true, "private": true,
"scripts": {
"prod": "gulp --production",
"dev": "gulp default watch"
},
"devDependencies": { "devDependencies": {
"gulp-livereload": "^3.8.1" "gulp-livereload": "^3.8.1"
}, },

View file

@ -7,16 +7,15 @@
convertNoticesToExceptions="true" convertNoticesToExceptions="true"
convertWarningsToExceptions="true" convertWarningsToExceptions="true"
processIsolation="false" processIsolation="false"
stopOnFailure="false" stopOnFailure="false">
syntaxCheck="false">
<testsuites> <testsuites>
<testsuite name="Application Test Suite"> <testsuite name="Application Test Suite">
<directory>./tests/</directory> <directory suffix="Test.php">./tests</directory>
</testsuite> </testsuite>
</testsuites> </testsuites>
<filter> <filter>
<whitelist> <whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">app/</directory> <directory suffix=".php">./app</directory>
</whitelist> </whitelist>
</filter> </filter>
<php> <php>

View file

@ -13,4 +13,8 @@
RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L] RewriteRule ^ index.php [L]
# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule> </IfModule>

View file

@ -4,7 +4,7 @@
* Laravel - A PHP Framework For Web Artisans * Laravel - A PHP Framework For Web Artisans
* *
* @package Laravel * @package Laravel
* @author Taylor Otwell <taylorotwell@gmail.com> * @author Taylor Otwell <taylor@laravel.com>
*/ */
/* /*

View file

@ -0,0 +1,19 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| Authentication Language Lines
|--------------------------------------------------------------------------
|
| The following language lines are used during authentication for various
| messages that we need to display to the user. You are free to modify
| these language lines according to your application's requirements.
|
*/
'failed' => 'These credentials do not match our records.',
'throttle' => 'Too many login attempts. Please try again in :seconds seconds.',
];

View file

@ -4,7 +4,7 @@ return [
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Password Reminder Language Lines | Password Reset Language Lines
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| The following language lines are the default lines which match reasons | The following language lines are the default lines which match reasons
@ -14,9 +14,9 @@ return [
*/ */
'password' => 'Passwords must be at least six characters and match the confirmation.', 'password' => 'Passwords must be at least six characters and match the confirmation.',
'user' => "We can't find a user with that e-mail address.",
'token' => 'This password reset token is invalid.',
'sent' => 'We have e-mailed your password reset link!',
'reset' => 'Your password has been reset!', 'reset' => 'Your password has been reset!',
'sent' => 'We have e-mailed your password reset link!',
'token' => 'This password reset token is invalid.',
'user' => "We can't find a user with that e-mail address.",
]; ];

View file

@ -34,13 +34,18 @@ return [
'different' => 'The :attribute and :other must be different.', 'different' => 'The :attribute and :other must be different.',
'digits' => 'The :attribute must be :digits digits.', 'digits' => 'The :attribute must be :digits digits.',
'digits_between' => 'The :attribute must be between :min and :max digits.', 'digits_between' => 'The :attribute must be between :min and :max digits.',
'dimensions' => 'The :attribute has invalid image dimensions.',
'distinct' => 'The :attribute field has a duplicate value.',
'email' => 'The :attribute must be a valid email address.', 'email' => 'The :attribute must be a valid email address.',
'filled' => 'The :attribute field is required.',
'exists' => 'The selected :attribute is invalid.', 'exists' => 'The selected :attribute is invalid.',
'file' => 'The :attribute must be a file.',
'filled' => 'The :attribute field is required.',
'image' => 'The :attribute must be an image.', 'image' => 'The :attribute must be an image.',
'in' => 'The selected :attribute is invalid.', 'in' => 'The selected :attribute is invalid.',
'in_array' => 'The :attribute field does not exist in :other.',
'integer' => 'The :attribute must be an integer.', 'integer' => 'The :attribute must be an integer.',
'ip' => 'The :attribute must be a valid IP address.', 'ip' => 'The :attribute must be a valid IP address.',
'json' => 'The :attribute must be a valid JSON string.',
'max' => [ 'max' => [
'numeric' => 'The :attribute may not be greater than :max.', 'numeric' => 'The :attribute may not be greater than :max.',
'file' => 'The :attribute may not be greater than :max kilobytes.', 'file' => 'The :attribute may not be greater than :max kilobytes.',
@ -56,9 +61,11 @@ return [
], ],
'not_in' => 'The selected :attribute is invalid.', 'not_in' => 'The selected :attribute is invalid.',
'numeric' => 'The :attribute must be a number.', 'numeric' => 'The :attribute must be a number.',
'present' => 'The :attribute field must be present.',
'regex' => 'The :attribute format is invalid.', 'regex' => 'The :attribute format is invalid.',
'required' => 'The :attribute field is required.', 'required' => 'The :attribute field is required.',
'required_if' => 'The :attribute field is required when :other is :value.', 'required_if' => 'The :attribute field is required when :other is :value.',
'required_unless' => 'The :attribute field is required unless :other is in :values.',
'required_with' => 'The :attribute field is required when :values is present.', 'required_with' => 'The :attribute field is required when :values is present.',
'required_with_all' => 'The :attribute field is required when :values is present.', 'required_with_all' => 'The :attribute field is required when :values is present.',
'required_without' => 'The :attribute field is required when :values is not present.', 'required_without' => 'The :attribute field is required when :values is not present.',

18
routes/api.php Normal file
View file

@ -0,0 +1,18 @@
<?php
use Illuminate\Http\Request;
/*
|--------------------------------------------------------------------------
| API Routes
|--------------------------------------------------------------------------
|
| Here is where you can register API routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| is assigned the "api" middleware group. Enjoy building your API!
|
*/
Route::get('/user', function (Request $request) {
return $request->user();
});

18
routes/console.php Normal file
View file

@ -0,0 +1,18 @@
<?php
use Illuminate\Foundation\Inspiring;
/*
|--------------------------------------------------------------------------
| Console Routes
|--------------------------------------------------------------------------
|
| This file is where you may define all of your Closure based console
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
|
*/
Artisan::command('inspire', function () {
$this->comment(Inspiring::quote());
});

45
routes/web.php Normal file
View file

@ -0,0 +1,45 @@
<?php
/*
|--------------------------------------------------------------------------
| Public Routes
|--------------------------------------------------------------------------
*/
Route::get('/', function() {
Head::setTitle('Home');
return view('website.index');
});
Route::get('/contact', function() {
Head::setTitle('Contact');
return view('website.contact');
});
/*
|--------------------------------------------------------------------------
| Post Routes
|--------------------------------------------------------------------------
*/
Route::post('/contact-submit', 'ContactController@postContactSubmit');
Route::post('/subscription-submit', 'SubscriptionController@postSubscriptionSubmit');
/*
|--------------------------------------------------------------------------
| Authentication Routes
|--------------------------------------------------------------------------
*/
Route::auth();
/*
|--------------------------------------------------------------------------
| Dashboard Routes
|--------------------------------------------------------------------------
*/
Route::group(['prefix' => 'dashboard'], function() {
Route::get('/', 'DashboardController@index');
Route::controller('', DashboardController::class);
});

View file

@ -4,7 +4,7 @@
* Laravel - A PHP Framework For Web Artisans * Laravel - A PHP Framework For Web Artisans
* *
* @package Laravel * @package Laravel
* @author Taylor Otwell <taylorotwell@gmail.com> * @author Taylor Otwell <taylor@laravel.com>
*/ */
$uri = urldecode( $uri = urldecode(

View file

@ -1,2 +1,3 @@
* *
!.gitignore !public/
!.gitignore

2
storage/app/public/.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
*
!.gitignore

View file

@ -1,5 +1,6 @@
config.php config.php
routes.php routes.php
schedule-*
compiled.php compiled.php
services.json services.json
events.scanned.php events.scanned.php

View file

@ -1,2 +1,2 @@
* *
!.gitignore !.gitignore

View file

@ -14,6 +14,6 @@ class ExampleTest extends TestCase
public function testBasicExample() public function testBasicExample()
{ {
$this->visit('/') $this->visit('/')
->see('Laravel 5'); ->see('Laravel');
} }
} }

View file

@ -1,6 +1,6 @@
<?php <?php
class TestCase extends Illuminate\Foundation\Testing\TestCase abstract class TestCase extends Illuminate\Foundation\Testing\TestCase
{ {
/** /**
* The base URL to use while testing the application. * The base URL to use while testing the application.