91 changed files with 13281 additions and 0 deletions
-
15.editorconfig
-
39.env.example
-
5.gitattributes
-
14.gitignore
-
42app/Console/Kernel.php
-
51app/Exceptions/Handler.php
-
32app/Http/Controllers/Auth/ForgotPasswordController.php
-
39app/Http/Controllers/Auth/LoginController.php
-
72app/Http/Controllers/Auth/RegisterController.php
-
39app/Http/Controllers/Auth/ResetPasswordController.php
-
41app/Http/Controllers/Auth/VerificationController.php
-
13app/Http/Controllers/Controller.php
-
80app/Http/Kernel.php
-
19app/Http/Middleware/Authenticate.php
-
17app/Http/Middleware/CheckForMaintenanceMode.php
-
17app/Http/Middleware/EncryptCookies.php
-
26app/Http/Middleware/RedirectIfAuthenticated.php
-
18app/Http/Middleware/TrimStrings.php
-
23app/Http/Middleware/TrustProxies.php
-
24app/Http/Middleware/VerifyCsrfToken.php
-
28app/Providers/AppServiceProvider.php
-
30app/Providers/AuthServiceProvider.php
-
21app/Providers/BroadcastServiceProvider.php
-
34app/Providers/EventServiceProvider.php
-
73app/Providers/RouteServiceProvider.php
-
30app/User.php
-
53artisan
-
55bootstrap/app.php
-
2bootstrap/cache/.gitignore
-
60composer.json
-
4130composer.lock
-
227config/app.php
-
102config/auth.php
-
59config/broadcasting.php
-
93config/cache.php
-
130config/database.php
-
69config/filesystems.php
-
52config/hashing.php
-
92config/logging.php
-
123config/mail.php
-
86config/queue.php
-
39config/services.php
-
199config/session.php
-
33config/view.php
-
1database/.gitignore
-
24database/factories/UserFactory.php
-
36database/migrations/2014_10_12_000000_create_users_table.php
-
32database/migrations/2014_10_12_100000_create_password_resets_table.php
-
16database/seeds/DatabaseSeeder.php
-
22package.json
-
33phpunit.xml
-
21public/.htaccess
-
6public/css/app.css
-
0public/favicon.ico
-
60public/index.php
-
1public/js/app.js
-
2public/robots.txt
-
1public/svg/403.svg
-
1public/svg/404.svg
-
1public/svg/500.svg
-
1public/svg/503.svg
-
22resources/js/app.js
-
56resources/js/bootstrap.js
-
23resources/js/components/ExampleComponent.vue
-
19resources/lang/en/auth.php
-
19resources/lang/en/pagination.php
-
22resources/lang/en/passwords.php
-
146resources/lang/en/validation.php
-
20resources/sass/_variables.scss
-
14resources/sass/app.scss
-
98resources/views/welcome.blade.php
-
18routes/api.php
-
16routes/channels.php
-
18routes/console.php
-
16routes/web.php
-
21server.php
-
3storage/app/.gitignore
-
2storage/app/public/.gitignore
-
8storage/framework/.gitignore
-
3storage/framework/cache/.gitignore
-
2storage/framework/cache/data/.gitignore
-
2storage/framework/sessions/.gitignore
-
2storage/framework/testing/.gitignore
-
2storage/framework/views/.gitignore
-
2storage/logs/.gitignore
-
22tests/CreatesApplication.php
-
21tests/Feature/ExampleTest.php
-
10tests/TestCase.php
-
19tests/Unit/ExampleTest.php
-
15webpack.mix.js
-
5936yarn.lock
@ -0,0 +1,15 @@ |
|||
root = true |
|||
|
|||
[*] |
|||
charset = utf-8 |
|||
end_of_line = lf |
|||
insert_final_newline = true |
|||
indent_style = space |
|||
indent_size = 4 |
|||
trim_trailing_whitespace = true |
|||
|
|||
[*.md] |
|||
trim_trailing_whitespace = false |
|||
|
|||
[*.yml] |
|||
indent_size = 2 |
@ -0,0 +1,39 @@ |
|||
APP_NAME=Laravel |
|||
APP_ENV=local |
|||
APP_KEY= |
|||
APP_DEBUG=true |
|||
APP_URL=http://localhost |
|||
|
|||
LOG_CHANNEL=stack |
|||
|
|||
DB_CONNECTION=mysql |
|||
DB_HOST=127.0.0.1 |
|||
DB_PORT=3306 |
|||
DB_DATABASE=homestead |
|||
DB_USERNAME=homestead |
|||
DB_PASSWORD=secret |
|||
|
|||
BROADCAST_DRIVER=log |
|||
CACHE_DRIVER=file |
|||
QUEUE_CONNECTION=sync |
|||
SESSION_DRIVER=file |
|||
SESSION_LIFETIME=120 |
|||
|
|||
REDIS_HOST=127.0.0.1 |
|||
REDIS_PASSWORD=null |
|||
REDIS_PORT=6379 |
|||
|
|||
MAIL_DRIVER=smtp |
|||
MAIL_HOST=smtp.mailtrap.io |
|||
MAIL_PORT=2525 |
|||
MAIL_USERNAME=null |
|||
MAIL_PASSWORD=null |
|||
MAIL_ENCRYPTION=null |
|||
|
|||
PUSHER_APP_ID= |
|||
PUSHER_APP_KEY= |
|||
PUSHER_APP_SECRET= |
|||
PUSHER_APP_CLUSTER=mt1 |
|||
|
|||
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" |
|||
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" |
@ -0,0 +1,5 @@ |
|||
* text=auto |
|||
*.css linguist-vendored |
|||
*.scss linguist-vendored |
|||
*.js linguist-vendored |
|||
CHANGELOG.md export-ignore |
@ -0,0 +1,14 @@ |
|||
/node_modules |
|||
/public/hot |
|||
/public/storage |
|||
/storage/*.key |
|||
/vendor |
|||
/.idea |
|||
/.vscode |
|||
/.vagrant |
|||
Homestead.json |
|||
Homestead.yaml |
|||
npm-debug.log |
|||
yarn-error.log |
|||
.env |
|||
.phpunit.result.cache |
@ -0,0 +1,42 @@ |
|||
<?php |
|||
|
|||
namespace App\Console; |
|||
|
|||
use Illuminate\Console\Scheduling\Schedule; |
|||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel; |
|||
|
|||
class Kernel extends ConsoleKernel |
|||
{ |
|||
/** |
|||
* The Artisan commands provided by your application. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $commands = [ |
|||
//
|
|||
]; |
|||
|
|||
/** |
|||
* Define the application's command schedule. |
|||
* |
|||
* @param \Illuminate\Console\Scheduling\Schedule $schedule |
|||
* @return void |
|||
*/ |
|||
protected function schedule(Schedule $schedule) |
|||
{ |
|||
// $schedule->command('inspire')
|
|||
// ->hourly();
|
|||
} |
|||
|
|||
/** |
|||
* Register the commands for the application. |
|||
* |
|||
* @return void |
|||
*/ |
|||
protected function commands() |
|||
{ |
|||
$this->load(__DIR__.'/Commands'); |
|||
|
|||
require base_path('routes/console.php'); |
|||
} |
|||
} |
@ -0,0 +1,51 @@ |
|||
<?php |
|||
|
|||
namespace App\Exceptions; |
|||
|
|||
use Exception; |
|||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; |
|||
|
|||
class Handler extends ExceptionHandler |
|||
{ |
|||
/** |
|||
* A list of the exception types that are not reported. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $dontReport = [ |
|||
//
|
|||
]; |
|||
|
|||
/** |
|||
* A list of the inputs that are never flashed for validation exceptions. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $dontFlash = [ |
|||
'password', |
|||
'password_confirmation', |
|||
]; |
|||
|
|||
/** |
|||
* Report or log an exception. |
|||
* |
|||
* @param \Exception $exception |
|||
* @return void |
|||
*/ |
|||
public function report(Exception $exception) |
|||
{ |
|||
parent::report($exception); |
|||
} |
|||
|
|||
/** |
|||
* Render an exception into an HTTP response. |
|||
* |
|||
* @param \Illuminate\Http\Request $request |
|||
* @param \Exception $exception |
|||
* @return \Illuminate\Http\Response |
|||
*/ |
|||
public function render($request, Exception $exception) |
|||
{ |
|||
return parent::render($request, $exception); |
|||
} |
|||
} |
@ -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'); |
|||
} |
|||
} |
@ -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. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $redirectTo = '/home'; |
|||
|
|||
/** |
|||
* Create a new controller instance. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function __construct() |
|||
{ |
|||
$this->middleware('guest')->except('logout'); |
|||
} |
|||
} |
@ -0,0 +1,72 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Controllers\Auth; |
|||
|
|||
use App\User; |
|||
use App\Http\Controllers\Controller; |
|||
use Illuminate\Support\Facades\Hash; |
|||
use Illuminate\Support\Facades\Validator; |
|||
use Illuminate\Foundation\Auth\RegistersUsers; |
|||
|
|||
class RegisterController extends Controller |
|||
{ |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Register Controller |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This controller handles the registration of new users as well as their |
|||
| validation and creation. By default this controller uses a trait to |
|||
| provide this functionality without requiring any additional code. |
|||
| |
|||
*/ |
|||
|
|||
use RegistersUsers; |
|||
|
|||
/** |
|||
* Where to redirect users after registration. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $redirectTo = '/home'; |
|||
|
|||
/** |
|||
* Create a new controller instance. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function __construct() |
|||
{ |
|||
$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|string|max:255', |
|||
'email' => 'required|string|email|max:255|unique:users', |
|||
'password' => 'required|string|min:6|confirmed', |
|||
]); |
|||
} |
|||
|
|||
/** |
|||
* Create a new user instance after a valid registration. |
|||
* |
|||
* @param array $data |
|||
* @return \App\User |
|||
*/ |
|||
protected function create(array $data) |
|||
{ |
|||
return User::create([ |
|||
'name' => $data['name'], |
|||
'email' => $data['email'], |
|||
'password' => Hash::make($data['password']), |
|||
]); |
|||
} |
|||
} |
@ -0,0 +1,39 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Controllers\Auth; |
|||
|
|||
use App\Http\Controllers\Controller; |
|||
use Illuminate\Foundation\Auth\ResetsPasswords; |
|||
|
|||
class ResetPasswordController extends Controller |
|||
{ |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Password Reset Controller |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This controller is responsible for handling password reset requests |
|||
| and uses a simple trait to include this behavior. You're free to |
|||
| explore this trait and override any methods you wish to tweak. |
|||
| |
|||
*/ |
|||
|
|||
use ResetsPasswords; |
|||
|
|||
/** |
|||
* Where to redirect users after resetting their password. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $redirectTo = '/home'; |
|||
|
|||
/** |
|||
* Create a new controller instance. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function __construct() |
|||
{ |
|||
$this->middleware('guest'); |
|||
} |
|||
} |
@ -0,0 +1,41 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Controllers\Auth; |
|||
|
|||
use App\Http\Controllers\Controller; |
|||
use Illuminate\Foundation\Auth\VerifiesEmails; |
|||
|
|||
class VerificationController extends Controller |
|||
{ |
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Email Verification Controller |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This controller is responsible for handling email verification for any |
|||
| user that recently registered with the application. Emails may also |
|||
| be re-sent if the user didn't receive the original email message. |
|||
| |
|||
*/ |
|||
|
|||
use VerifiesEmails; |
|||
|
|||
/** |
|||
* Where to redirect users after verification. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $redirectTo = '/home'; |
|||
|
|||
/** |
|||
* Create a new controller instance. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function __construct() |
|||
{ |
|||
$this->middleware('auth'); |
|||
$this->middleware('signed')->only('verify'); |
|||
$this->middleware('throttle:6,1')->only('verify', 'resend'); |
|||
} |
|||
} |
@ -0,0 +1,13 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Controllers; |
|||
|
|||
use Illuminate\Foundation\Bus\DispatchesJobs; |
|||
use Illuminate\Routing\Controller as BaseController; |
|||
use Illuminate\Foundation\Validation\ValidatesRequests; |
|||
use Illuminate\Foundation\Auth\Access\AuthorizesRequests; |
|||
|
|||
class Controller extends BaseController |
|||
{ |
|||
use AuthorizesRequests, DispatchesJobs, ValidatesRequests; |
|||
} |
@ -0,0 +1,80 @@ |
|||
<?php |
|||
|
|||
namespace App\Http; |
|||
|
|||
use Illuminate\Foundation\Http\Kernel as HttpKernel; |
|||
|
|||
class Kernel extends HttpKernel |
|||
{ |
|||
/** |
|||
* The application's global HTTP middleware stack. |
|||
* |
|||
* These middleware are run during every request to your application. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $middleware = [ |
|||
\App\Http\Middleware\CheckForMaintenanceMode::class, |
|||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, |
|||
\App\Http\Middleware\TrimStrings::class, |
|||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::class, |
|||
\App\Http\Middleware\TrustProxies::class, |
|||
]; |
|||
|
|||
/** |
|||
* The application's route middleware groups. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $middlewareGroups = [ |
|||
'web' => [ |
|||
\App\Http\Middleware\EncryptCookies::class, |
|||
\Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class, |
|||
\Illuminate\Session\Middleware\StartSession::class, |
|||
// \Illuminate\Session\Middleware\AuthenticateSession::class,
|
|||
\Illuminate\View\Middleware\ShareErrorsFromSession::class, |
|||
\App\Http\Middleware\VerifyCsrfToken::class, |
|||
\Illuminate\Routing\Middleware\SubstituteBindings::class, |
|||
], |
|||
|
|||
'api' => [ |
|||
'throttle:60,1', |
|||
'bindings', |
|||
], |
|||
]; |
|||
|
|||
/** |
|||
* The application's route middleware. |
|||
* |
|||
* These middleware may be assigned to groups or used individually. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $routeMiddleware = [ |
|||
'auth' => \App\Http\Middleware\Authenticate::class, |
|||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, |
|||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, |
|||
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class, |
|||
'can' => \Illuminate\Auth\Middleware\Authorize::class, |
|||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, |
|||
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class, |
|||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, |
|||
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class, |
|||
]; |
|||
|
|||
/** |
|||
* The priority-sorted list of middleware. |
|||
* |
|||
* This forces the listed middleware to always be in the given order. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $middlewarePriority = [ |
|||
\Illuminate\Session\Middleware\StartSession::class, |
|||
\Illuminate\View\Middleware\ShareErrorsFromSession::class, |
|||
\App\Http\Middleware\Authenticate::class, |
|||
\Illuminate\Session\Middleware\AuthenticateSession::class, |
|||
\Illuminate\Routing\Middleware\SubstituteBindings::class, |
|||
\Illuminate\Auth\Middleware\Authorize::class, |
|||
]; |
|||
} |
@ -0,0 +1,19 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Auth\Middleware\Authenticate as Middleware; |
|||
|
|||
class Authenticate extends Middleware |
|||
{ |
|||
/** |
|||
* Get the path the user should be redirected to when they are not authenticated. |
|||
* |
|||
* @param \Illuminate\Http\Request $request |
|||
* @return string |
|||
*/ |
|||
protected function redirectTo($request) |
|||
{ |
|||
return route('login'); |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware; |
|||
|
|||
class CheckForMaintenanceMode extends Middleware |
|||
{ |
|||
/** |
|||
* The URIs that should be reachable while maintenance mode is enabled. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $except = [ |
|||
//
|
|||
]; |
|||
} |
@ -0,0 +1,17 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Cookie\Middleware\EncryptCookies as Middleware; |
|||
|
|||
class EncryptCookies extends Middleware |
|||
{ |
|||
/** |
|||
* The names of the cookies that should not be encrypted. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $except = [ |
|||
//
|
|||
]; |
|||
} |
@ -0,0 +1,26 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Closure; |
|||
use Illuminate\Support\Facades\Auth; |
|||
|
|||
class RedirectIfAuthenticated |
|||
{ |
|||
/** |
|||
* 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)->check()) { |
|||
return redirect('/home'); |
|||
} |
|||
|
|||
return $next($request); |
|||
} |
|||
} |
@ -0,0 +1,18 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware; |
|||
|
|||
class TrimStrings extends Middleware |
|||
{ |
|||
/** |
|||
* The names of the attributes that should not be trimmed. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $except = [ |
|||
'password', |
|||
'password_confirmation', |
|||
]; |
|||
} |
@ -0,0 +1,23 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Http\Request; |
|||
use Fideloper\Proxy\TrustProxies as Middleware; |
|||
|
|||
class TrustProxies extends Middleware |
|||
{ |
|||
/** |
|||
* The trusted proxies for this application. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $proxies; |
|||
|
|||
/** |
|||
* The headers that should be used to detect proxies. |
|||
* |
|||
* @var int |
|||
*/ |
|||
protected $headers = Request::HEADER_X_FORWARDED_ALL; |
|||
} |
@ -0,0 +1,24 @@ |
|||
<?php |
|||
|
|||
namespace App\Http\Middleware; |
|||
|
|||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as Middleware; |
|||
|
|||
class VerifyCsrfToken extends Middleware |
|||
{ |
|||
/** |
|||
* Indicates whether the XSRF-TOKEN cookie should be set on the response. |
|||
* |
|||
* @var bool |
|||
*/ |
|||
protected $addHttpCookie = true; |
|||
|
|||
/** |
|||
* The URIs that should be excluded from CSRF verification. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $except = [ |
|||
//
|
|||
]; |
|||
} |
@ -0,0 +1,28 @@ |
|||
<?php |
|||
|
|||
namespace App\Providers; |
|||
|
|||
use Illuminate\Support\ServiceProvider; |
|||
|
|||
class AppServiceProvider extends ServiceProvider |
|||
{ |
|||
/** |
|||
* Bootstrap any application services. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function boot() |
|||
{ |
|||
//
|
|||
} |
|||
|
|||
/** |
|||
* Register any application services. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function register() |
|||
{ |
|||
//
|
|||
} |
|||
} |
@ -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(); |
|||
|
|||
//
|
|||
} |
|||
} |
@ -0,0 +1,21 @@ |
|||
<?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(); |
|||
|
|||
require base_path('routes/channels.php'); |
|||
} |
|||
} |
@ -0,0 +1,34 @@ |
|||
<?php |
|||
|
|||
namespace App\Providers; |
|||
|
|||
use Illuminate\Support\Facades\Event; |
|||
use Illuminate\Auth\Events\Registered; |
|||
use Illuminate\Auth\Listeners\SendEmailVerificationNotification; |
|||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; |
|||
|
|||
class EventServiceProvider extends ServiceProvider |
|||
{ |
|||
/** |
|||
* The event listener mappings for the application. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $listen = [ |
|||
Registered::class => [ |
|||
SendEmailVerificationNotification::class, |
|||
], |
|||
]; |
|||
|
|||
/** |
|||
* Register any events for your application. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function boot() |
|||
{ |
|||
parent::boot(); |
|||
|
|||
//
|
|||
} |
|||
} |
@ -0,0 +1,73 @@ |
|||
<?php |
|||
|
|||
namespace App\Providers; |
|||
|
|||
use Illuminate\Support\Facades\Route; |
|||
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
|||
|
|||
class RouteServiceProvider extends ServiceProvider |
|||
{ |
|||
/** |
|||
* This namespace is applied to your controller routes. |
|||
* |
|||
* In addition, it is set as the URL generator's root namespace. |
|||
* |
|||
* @var string |
|||
*/ |
|||
protected $namespace = 'App\Http\Controllers'; |
|||
|
|||
/** |
|||
* Define your route model bindings, pattern filters, etc. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function boot() |
|||
{ |
|||
//
|
|||
|
|||
parent::boot(); |
|||
} |
|||
|
|||
/** |
|||
* Define the routes for the application. |
|||
* |
|||
* @return void |
|||
*/ |
|||
public function map() |
|||
{ |
|||
$this->mapApiRoutes(); |
|||
|
|||
$this->mapWebRoutes(); |
|||
|
|||
//
|
|||
} |
|||
|
|||
/** |
|||
* Define the "web" routes for the application. |
|||
* |
|||
* These routes all receive session state, CSRF protection, etc. |
|||
* |
|||
* @return void |
|||
*/ |
|||
protected function mapWebRoutes() |
|||
{ |
|||
Route::middleware('web') |
|||
->namespace($this->namespace) |
|||
->group(base_path('routes/web.php')); |
|||
} |
|||
|
|||
/** |
|||
* Define the "api" routes for the application. |
|||
* |
|||
* These routes are typically stateless. |
|||
* |
|||
* @return void |
|||
*/ |
|||
protected function mapApiRoutes() |
|||
{ |
|||
Route::prefix('api') |
|||
->middleware('api') |
|||
->namespace($this->namespace) |
|||
->group(base_path('routes/api.php')); |
|||
} |
|||
} |
@ -0,0 +1,30 @@ |
|||
<?php |
|||
|
|||
namespace App; |
|||
|
|||
use Illuminate\Notifications\Notifiable; |
|||
use Illuminate\Contracts\Auth\MustVerifyEmail; |
|||
use Illuminate\Foundation\Auth\User as Authenticatable; |
|||
|
|||
class User extends Authenticatable |
|||
{ |
|||
use Notifiable; |
|||
|
|||
/** |
|||
* The attributes that are mass assignable. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $fillable = [ |
|||
'name', 'email', 'password', |
|||
]; |
|||
|
|||
/** |
|||
* The attributes that should be hidden for arrays. |
|||
* |
|||
* @var array |
|||
*/ |
|||
protected $hidden = [ |
|||
'password', 'remember_token', |
|||
]; |
|||
} |
@ -0,0 +1,53 @@ |
|||
#!/usr/bin/env php |
|||
<?php |
|||
|
|||
define('LARAVEL_START', microtime(true)); |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Register The Auto Loader |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Composer provides a convenient, automatically generated class loader |
|||
| for our application. We just need to utilize it! We'll require it |
|||
| into the script here so that we do not have to worry about the |
|||
| loading of any our classes "manually". Feels great to relax. |
|||
| |
|||
*/ |
|||
|
|||
require __DIR__.'/vendor/autoload.php'; |
|||
|
|||
$app = require_once __DIR__.'/bootstrap/app.php'; |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Run The Artisan Application |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When we run the console application, the current CLI command will be |
|||
| executed in this console and the response sent back to a terminal |
|||
| or another output device for the developers. Here goes nothing! |
|||
| |
|||
*/ |
|||
|
|||
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); |
|||
|
|||
$status = $kernel->handle( |
|||
$input = new Symfony\Component\Console\Input\ArgvInput, |
|||
new Symfony\Component\Console\Output\ConsoleOutput |
|||
); |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Shutdown The Application |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Once Artisan has finished running, we will fire off the shutdown events |
|||
| so that any final work may be done by the application before we shut |
|||
| down the process. This is the last thing to happen to the request. |
|||
| |
|||
*/ |
|||
|
|||
$kernel->terminate($input, $status); |
|||
|
|||
exit($status); |
@ -0,0 +1,55 @@ |
|||
<?php |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Create The Application |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The first thing we will do is create a new Laravel application instance |
|||
| which serves as the "glue" for all the components of Laravel, and is |
|||
| the IoC container for the system binding all of the various parts. |
|||
| |
|||
*/ |
|||
|
|||
$app = new Illuminate\Foundation\Application( |
|||
dirname(__DIR__) |
|||
); |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Bind Important Interfaces |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Next, we need to bind some important interfaces into the container so |
|||
| we will be able to resolve them when needed. The kernels serve the |
|||
| incoming requests to this application from both the web and CLI. |
|||
| |
|||
*/ |
|||
|
|||
$app->singleton( |
|||
Illuminate\Contracts\Http\Kernel::class, |
|||
App\Http\Kernel::class |
|||
); |
|||
|
|||
$app->singleton( |
|||
Illuminate\Contracts\Console\Kernel::class, |
|||
App\Console\Kernel::class |
|||
); |
|||
|
|||
$app->singleton( |
|||
Illuminate\Contracts\Debug\ExceptionHandler::class, |
|||
App\Exceptions\Handler::class |
|||
); |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Return The Application |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This script returns the application instance. The instance is given to |
|||
| the calling script so we can separate the building of the instances |
|||
| from the actual running of the application and sending responses. |
|||
| |
|||
*/ |
|||
|
|||
return $app; |
@ -0,0 +1,2 @@ |
|||
* |
|||
!.gitignore |
@ -0,0 +1,60 @@ |
|||
{ |
|||
"name": "laravel/laravel", |
|||
"description": "The Laravel Framework.", |
|||
"keywords": ["framework", "laravel"], |
|||
"license": "MIT", |
|||
"type": "project", |
|||
"require": { |
|||
"php": "^7.1.3", |
|||
"fideloper/proxy": "^4.0", |
|||
"laravel/framework": "5.7.*", |
|||
"laravel/tinker": "^1.0" |
|||
}, |
|||
"require-dev": { |
|||
"beyondcode/laravel-dump-server": "^1.0", |
|||
"filp/whoops": "^2.0", |
|||
"fzaninotto/faker": "^1.4", |
|||
"mockery/mockery": "^1.0", |
|||
"nunomaduro/collision": "^2.0", |
|||
"phpunit/phpunit": "^7.0" |
|||
}, |
|||
"autoload": { |
|||
"classmap": [ |
|||
"database/seeds", |
|||
"database/factories" |
|||
], |
|||
"psr-4": { |
|||
"App\\": "app/" |
|||
} |
|||
}, |
|||
"autoload-dev": { |
|||
"psr-4": { |
|||
"Tests\\": "tests/" |
|||
} |
|||
}, |
|||
"extra": { |
|||
"laravel": { |
|||
"dont-discover": [ |
|||
] |
|||
} |
|||
}, |
|||
"scripts": { |
|||
"post-root-package-install": [ |
|||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"" |
|||
], |
|||
"post-create-project-cmd": [ |
|||
"@php artisan key:generate --ansi" |
|||
], |
|||
"post-autoload-dump": [ |
|||
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump", |
|||
"@php artisan package:discover --ansi" |
|||
] |
|||
}, |
|||
"config": { |
|||
"preferred-install": "dist", |
|||
"sort-packages": true, |
|||
"optimize-autoloader": true |
|||
}, |
|||
"minimum-stability": "dev", |
|||
"prefer-stable": true |
|||
} |
4130
composer.lock
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,227 @@ |
|||
<?php |
|||
|
|||
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('APP_NAME', 'Laravel'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Environment |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This value determines the "environment" your application is currently |
|||
| running in. This may determine how you prefer to configure various |
|||
| services the application utilizes. Set this in your ".env" file. |
|||
| |
|||
*/ |
|||
|
|||
'env' => env('APP_ENV', 'production'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Debug Mode |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When your application is in debug mode, detailed error messages with |
|||
| stack traces will be shown on every error that occurs within your |
|||
| application. If disabled, a simple generic error page is shown. |
|||
| |
|||
*/ |
|||
|
|||
'debug' => env('APP_DEBUG', false), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application URL |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This URL is used by the console to properly generate URLs when using |
|||
| the Artisan command line tool. You should set this to the root of |
|||
| your application so that it is used when running Artisan tasks. |
|||
| |
|||
*/ |
|||
|
|||
'url' => env('APP_URL', 'http://localhost'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Timezone |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify the default timezone for your application, which |
|||
| will be used by the PHP date and date-time functions. We have gone |
|||
| ahead and set this to a sensible default for you out of the box. |
|||
| |
|||
*/ |
|||
|
|||
'timezone' => 'UTC', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Locale Configuration |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The application locale determines the default locale that will be used |
|||
| by the translation service provider. You are free to set this value |
|||
| to any of the locales which will be supported by the application. |
|||
| |
|||
*/ |
|||
|
|||
'locale' => 'en', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Application Fallback Locale |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The fallback locale determines the locale to use when the current one |
|||
| is not available. You may change the value to correspond to any of |
|||
| the language folders that are provided through your application. |
|||
| |
|||
*/ |
|||
|
|||
'fallback_locale' => 'en', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Faker Locale |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This locale will be used by the Faker PHP library when generating fake |
|||
| data for your database seeds. For example, this will be used to get |
|||
| localized telephone numbers, street address information and more. |
|||
| |
|||
*/ |
|||
|
|||
'faker_locale' => 'en_US', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Encryption Key |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This key is used by the Illuminate encrypter service and should be set |
|||
| to a random, 32 character string, otherwise these encrypted strings |
|||
| will not be safe. Please do this before deploying an application! |
|||
| |
|||
*/ |
|||
|
|||
'key' => env('APP_KEY'), |
|||
|
|||
'cipher' => 'AES-256-CBC', |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Autoloaded Service Providers |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| The service providers listed here will be automatically loaded on the |
|||
| request to your application. Feel free to add your own services to |
|||
| this array to grant expanded functionality to your applications. |
|||
| |
|||
*/ |
|||
|
|||
'providers' => [ |
|||
|
|||
/* |
|||
* Laravel Framework Service Providers... |
|||
*/ |
|||
Illuminate\Auth\AuthServiceProvider::class, |
|||
Illuminate\Broadcasting\BroadcastServiceProvider::class, |
|||
Illuminate\Bus\BusServiceProvider::class, |
|||
Illuminate\Cache\CacheServiceProvider::class, |
|||
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class, |
|||
Illuminate\Cookie\CookieServiceProvider::class, |
|||
Illuminate\Database\DatabaseServiceProvider::class, |
|||
Illuminate\Encryption\EncryptionServiceProvider::class, |
|||
Illuminate\Filesystem\FilesystemServiceProvider::class, |
|||
Illuminate\Foundation\Providers\FoundationServiceProvider::class, |
|||
Illuminate\Hashing\HashServiceProvider::class, |
|||
Illuminate\Mail\MailServiceProvider::class, |
|||
Illuminate\Notifications\NotificationServiceProvider::class, |
|||
Illuminate\Pagination\PaginationServiceProvider::class, |
|||
Illuminate\Pipeline\PipelineServiceProvider::class, |
|||
Illuminate\Queue\QueueServiceProvider::class, |
|||
Illuminate\Redis\RedisServiceProvider::class, |
|||
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class, |
|||
Illuminate\Session\SessionServiceProvider::class, |
|||
Illuminate\Translation\TranslationServiceProvider::class, |
|||
Illuminate\Validation\ValidationServiceProvider::class, |
|||
Illuminate\View\ViewServiceProvider::class, |
|||
|
|||
/* |
|||
* Package Service Providers... |
|||
*/ |
|||
|
|||
/* |
|||
* Application Service Providers... |
|||
*/ |
|||
App\Providers\AppServiceProvider::class, |
|||
App\Providers\AuthServiceProvider::class, |
|||
// App\Providers\BroadcastServiceProvider::class,
|
|||
App\Providers\EventServiceProvider::class, |
|||
App\Providers\RouteServiceProvider::class, |
|||
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Class Aliases |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This array of class aliases will be registered when this application |
|||
| is started. However, feel free to register as many as you wish as |
|||
| the aliases are "lazy" loaded so they don't hinder performance. |
|||
| |
|||
*/ |
|||
|
|||
'aliases' => [ |
|||
|
|||
'App' => Illuminate\Support\Facades\App::class, |
|||
'Artisan' => Illuminate\Support\Facades\Artisan::class, |
|||
'Auth' => Illuminate\Support\Facades\Auth::class, |
|||
'Blade' => Illuminate\Support\Facades\Blade::class, |
|||
'Broadcast' => Illuminate\Support\Facades\Broadcast::class, |
|||
'Bus' => Illuminate\Support\Facades\Bus::class, |
|||
'Cache' => Illuminate\Support\Facades\Cache::class, |
|||
'Config' => Illuminate\Support\Facades\Config::class, |
|||
'Cookie' => Illuminate\Support\Facades\Cookie::class, |
|||
'Crypt' => Illuminate\Support\Facades\Crypt::class, |
|||
'DB' => Illuminate\Support\Facades\DB::class, |
|||
'Eloquent' => Illuminate\Database\Eloquent\Model::class, |
|||
'Event' => Illuminate\Support\Facades\Event::class, |
|||
'File' => Illuminate\Support\Facades\File::class, |
|||
'Gate' => Illuminate\Support\Facades\Gate::class, |
|||
'Hash' => Illuminate\Support\Facades\Hash::class, |
|||
'Lang' => Illuminate\Support\Facades\Lang::class, |
|||
'Log' => Illuminate\Support\Facades\Log::class, |
|||
'Mail' => Illuminate\Support\Facades\Mail::class, |
|||
'Notification' => Illuminate\Support\Facades\Notification::class, |
|||
'Password' => Illuminate\Support\Facades\Password::class, |
|||
'Queue' => Illuminate\Support\Facades\Queue::class, |
|||
'Redirect' => Illuminate\Support\Facades\Redirect::class, |
|||
'Redis' => Illuminate\Support\Facades\Redis::class, |
|||
'Request' => Illuminate\Support\Facades\Request::class, |
|||
'Response' => Illuminate\Support\Facades\Response::class, |
|||
'Route' => Illuminate\Support\Facades\Route::class, |
|||
'Schema' => Illuminate\Support\Facades\Schema::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, |
|||
'View' => Illuminate\Support\Facades\View::class, |
|||
|
|||
], |
|||
|
|||
]; |
@ -0,0 +1,102 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Authentication Defaults |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default authentication "guard" and password |
|||
| reset options for your application. You may change these defaults |
|||
| as required, but they're a perfect start for most applications. |
|||
| |
|||
*/ |
|||
|
|||
'defaults' => [ |
|||
'guard' => 'web', |
|||
'passwords' => 'users', |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Authentication Guards |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Next, you may define every authentication guard for your application. |
|||
| Of course, a great default configuration has been defined for you |
|||
| here which uses session storage and the Eloquent user provider. |
|||
| |
|||
| All authentication drivers have a user provider. This defines how the |
|||
| users are actually retrieved out of your database or other storage |
|||
| mechanisms used by this application to persist your user's data. |
|||
| |
|||
| Supported: "session", "token" |
|||
| |
|||
*/ |
|||
|
|||
'guards' => [ |
|||
'web' => [ |
|||
'driver' => 'session', |
|||
'provider' => 'users', |
|||
], |
|||
|
|||
'api' => [ |
|||
'driver' => 'token', |
|||
'provider' => 'users', |
|||
], |
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| User Providers |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| All authentication drivers have a user provider. This defines how the |
|||
| users are actually retrieved out of your database or other storage |
|||
| mechanisms used by this application to persist your user's data. |
|||
| |
|||
| If you have multiple user tables or models you may configure multiple |
|||
| sources which represent each model / table. These sources may then |
|||
| be assigned to any extra authentication guards you have defined. |
|||
| |
|||
| Supported: "database", "eloquent" |
|||
| |
|||
*/ |
|||
|
|||
'providers' => [ |
|||
'users' => [ |
|||
'driver' => 'eloquent', |
|||
'model' => App\User::class, |
|||
], |
|||
|
|||
// 'users' => [
|
|||
// 'driver' => 'database',
|
|||
// 'table' => 'users',
|
|||
// ],
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Resetting Passwords |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| You may specify multiple password reset configurations if you have more |
|||
| than one user table or model in the application and you want to have |
|||
| separate password reset settings based on the specific user types. |
|||
| |
|||
| The expire time is the number of minutes that the reset token should be |
|||
| considered valid. This security feature keeps tokens short-lived so |
|||
| they have less time to be guessed. You may change this as needed. |
|||
| |
|||
*/ |
|||
|
|||
'passwords' => [ |
|||
'users' => [ |
|||
'provider' => 'users', |
|||
'table' => 'password_resets', |
|||
'expire' => 60, |
|||
], |
|||
], |
|||
|
|||
]; |
@ -0,0 +1,59 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Broadcaster |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default broadcaster that will be used by the |
|||
| framework when an event needs to be broadcast. You may set this to |
|||
| any of the connections defined in the "connections" array below. |
|||
| |
|||
| Supported: "pusher", "redis", "log", "null" |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('BROADCAST_DRIVER', 'null'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Broadcast Connections |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may define all of the broadcast connections that will be used |
|||
| to broadcast events to other systems or over websockets. Samples of |
|||
| each available type of connection are provided inside this array. |
|||
| |
|||
*/ |
|||
|
|||
'connections' => [ |
|||
|
|||
'pusher' => [ |
|||
'driver' => 'pusher', |
|||
'key' => env('PUSHER_APP_KEY'), |
|||
'secret' => env('PUSHER_APP_SECRET'), |
|||
'app_id' => env('PUSHER_APP_ID'), |
|||
'options' => [ |
|||
'cluster' => env('PUSHER_APP_CLUSTER'), |
|||
'encrypted' => true, |
|||
], |
|||
], |
|||
|
|||
'redis' => [ |
|||
'driver' => 'redis', |
|||
'connection' => 'default', |
|||
], |
|||
|
|||
'log' => [ |
|||
'driver' => 'log', |
|||
], |
|||
|
|||
'null' => [ |
|||
'driver' => 'null', |
|||
], |
|||
|
|||
], |
|||
|
|||
]; |
@ -0,0 +1,93 @@ |
|||
<?php |
|||
|
|||
use Illuminate\Support\Str; |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Cache Store |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| This option controls the default cache connection that gets used while |
|||
| using this caching library. This connection is used when another is |
|||
| not explicitly specified when executing a given caching function. |
|||
| |
|||
| Supported: "apc", "array", "database", "file", "memcached", "redis" |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('CACHE_DRIVER', 'file'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Stores |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may define all of the cache "stores" for your application as |
|||
| well as their drivers. You may even define multiple stores for the |
|||
| same cache driver to group types of items stored in your caches. |
|||
| |
|||
*/ |
|||
|
|||
'stores' => [ |
|||
|
|||
'apc' => [ |
|||
'driver' => 'apc', |
|||
], |
|||
|
|||
'array' => [ |
|||
'driver' => 'array', |
|||
], |
|||
|
|||
'database' => [ |
|||
'driver' => 'database', |
|||
'table' => 'cache', |
|||
'connection' => null, |
|||
], |
|||
|
|||
'file' => [ |
|||
'driver' => 'file', |
|||
'path' => storage_path('framework/cache/data'), |
|||
], |
|||
|
|||
'memcached' => [ |
|||
'driver' => 'memcached', |
|||
'persistent_id' => env('MEMCACHED_PERSISTENT_ID'), |
|||
'sasl' => [ |
|||
env('MEMCACHED_USERNAME'), |
|||
env('MEMCACHED_PASSWORD'), |
|||
], |
|||
'options' => [ |
|||
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
|
|||
], |
|||
'servers' => [ |
|||
[ |
|||
'host' => env('MEMCACHED_HOST', '127.0.0.1'), |
|||
'port' => env('MEMCACHED_PORT', 11211), |
|||
'weight' => 100, |
|||
], |
|||
], |
|||
], |
|||
|
|||
'redis' => [ |
|||
'driver' => 'redis', |
|||
'connection' => 'cache', |
|||
], |
|||
|
|||
], |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Cache Key Prefix |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| When utilizing a RAM based store such as APC or Memcached, there might |
|||
| be other applications utilizing the same cache. So, we'll specify a |
|||
| value to get prefixed to all our keys so we can avoid collisions. |
|||
| |
|||
*/ |
|||
|
|||
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'), |
|||
|
|||
]; |
@ -0,0 +1,130 @@ |
|||
<?php |
|||
|
|||
return [ |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Default Database Connection Name |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here you may specify which of the database connections below you wish |
|||
| to use as your default connection for all database work. Of course |
|||
| you may use many connections at once using the Database library. |
|||
| |
|||
*/ |
|||
|
|||
'default' => env('DB_CONNECTION', 'mysql'), |
|||
|
|||
/* |
|||
|-------------------------------------------------------------------------- |
|||
| Database Connections |
|||
|-------------------------------------------------------------------------- |
|||
| |
|||
| Here are each of the database connections setup for your application. |
|||
| Of course, examples of configuring each database platform that is |
|||
| supported by Laravel is shown below to make development simple. |
|||
| |
|||
| |
|||
| All database work in Laravel is done through the PHP PDO facilities |
|||
| so make sure you have the driver for your particular database of |
|||
| choice installed on your machine before you begin development. |
|||
| |
|||
*/ |
|||
|
|||
'connections' => [ |
|||
|
|||
'sqlite' => [ |
|||
'driver' => 'sqlite', |
|||
'database' => env('DB_DATABASE', database_path('database.sqlite')), |
|||
'prefix' => '', |
|||
], |
|||
|
|||
'mysql' => [ |
|||
'driver' => 'mysql', |
|||
'host' => env('DB_HOST', '127.0.0.1'), |
|||
'port' => env('DB_PORT', '3306'), |
|||
'database' => env('DB_DATABASE', 'forge'), |
|||
'username' => env('DB_USERNAME', 'forge'), |
|||
'password' => env('DB_PASSWORD', ''), |
|||
'unix_socket' => env('DB_SOCKET', ''), |
|||
'charset' => 'utf8mb4', |
|||
'collation' => 'utf8mb4_unicode_ci', |
|||
'prefix' => '', |
|||
'prefix_indexes' => true, |
|||
'strict' => true, |
|||
'engine' => null, |
|||
], |
|||
|
|||
'pgsql' => [ |
|||
'driver' => 'pgsql', |
|||
'host' => env('DB_HOST', '127.0.0.1'), |
|||
'port' => env('DB_PORT', '5432'), |
|||
'database' => env('DB_DATABASE', 'forge'), |
|||
'username' => env('DB_USERNAME', 'forge'), |
|||
'password' => env('DB_PASSWORD', ''), |
|||
'charset' => 'utf8', |
|||
'prefix' => '', |
|||
'prefix_indexes' => true, |
|||
'schema' => 'public', |
|||
'sslmode' => 'prefer', |
|||
], |
|||
|
|||
'sqlsrv' => [ |
|||
'driver' => 'sqlsrv', |
|||
'host' => env('DB_HOST', 'localhost'), |
|||
'port' => env('DB_PORT', '1433'), |
|||
'database' => env('DB_DATABASE', 'forge'), |
|||
'username' => env('DB_USERNAME', 'forge'), |
|||