@ -0,0 +1,33 @@ | |||
APP_NAME=Laravel | |||
APP_ENV=local | |||
APP_KEY= | |||
APP_DEBUG=true | |||
APP_LOG_LEVEL=debug | |||
APP_URL=http://localhost | |||
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 | |||
SESSION_DRIVER=file | |||
QUEUE_DRIVER=sync | |||
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= |
@ -0,0 +1,5 @@ | |||
* text=auto | |||
*.css linguist-vendored | |||
*.scss linguist-vendored | |||
*.js linguist-vendored | |||
CHANGELOG.md export-ignore |
@ -1,20 +1,11 @@ | |||
vendor/ | |||
node_modules/ | |||
/node_modules | |||
/public/hot | |||
/public/storage | |||
/storage/*.key | |||
/vendor | |||
/.idea | |||
/.vagrant | |||
Homestead.json | |||
Homestead.yaml | |||
npm-debug.log | |||
# Laravel 4 specific | |||
bootstrap/compiled.php | |||
app/storage/ | |||
# Laravel 5 & Lumen specific | |||
public/storage | |||
public/hot | |||
storage/*.key | |||
.env.*.php | |||
.env.php | |||
.env | |||
Homestead.yaml | |||
Homestead.json | |||
# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer | |||
.rocketeer/ |
@ -1,2 +1,51 @@ | |||
# drone-laravel-example | |||
Drone CI/CD with Laravel Framework | |||
<p align="center"><img src="https://laravel.com/assets/img/components/logo-laravel.svg"></p> | |||
<p align="center"> | |||
<a href="https://travis-ci.org/laravel/framework"><img src="https://travis-ci.org/laravel/framework.svg" alt="Build Status"></a> | |||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/d/total.svg" alt="Total Downloads"></a> | |||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/v/stable.svg" alt="Latest Stable Version"></a> | |||
<a href="https://packagist.org/packages/laravel/framework"><img src="https://poser.pugx.org/laravel/framework/license.svg" alt="License"></a> | |||
</p> | |||
## About Laravel | |||
Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experience to be truly fulfilling. Laravel attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as: | |||
- [Simple, fast routing engine](https://laravel.com/docs/routing). | |||
- [Powerful dependency injection container](https://laravel.com/docs/container). | |||
- Multiple back-ends for [session](https://laravel.com/docs/session) and [cache](https://laravel.com/docs/cache) storage. | |||
- Expressive, intuitive [database ORM](https://laravel.com/docs/eloquent). | |||
- Database agnostic [schema migrations](https://laravel.com/docs/migrations). | |||
- [Robust background job processing](https://laravel.com/docs/queues). | |||
- [Real-time event broadcasting](https://laravel.com/docs/broadcasting). | |||
Laravel is accessible, yet powerful, providing tools needed for large, robust applications. A superb combination of simplicity, elegance, and innovation give you tools you need to build any application with which you are tasked. | |||
## Learning Laravel | |||
Laravel has the most extensive and thorough documentation and video tutorial library of any modern web application framework. The [Laravel documentation](https://laravel.com/docs) is thorough, complete, and makes it a breeze to get started learning the framework. | |||
If you're not in the mood to read, [Laracasts](https://laracasts.com) contains over 900 video tutorials on a range of topics including Laravel, modern PHP, unit testing, JavaScript, and more. Boost the skill level of yourself and your entire team by digging into our comprehensive video library. | |||
## Laravel Sponsors | |||
We would like to extend our thanks to the following sponsors for helping fund on-going Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](http://patreon.com/taylorotwell): | |||
- **[Vehikl](http://vehikl.com)** | |||
- **[Tighten Co.](https://tighten.co)** | |||
- **[British Software Development](https://www.britishsoftware.co)** | |||
- **[Styde](https://styde.net)** | |||
- [Fragrantica](https://www.fragrantica.com) | |||
- [SOFTonSOFA](https://softonsofa.com/) | |||
## Contributing | |||
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](http://laravel.com/docs/contributions). | |||
## Security Vulnerabilities | |||
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell at taylor@laravel.com. All security vulnerabilities will be promptly addressed. | |||
## License | |||
The Laravel framework is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT). |
@ -0,0 +1,40 @@ | |||
<?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 Closure based commands for the application. | |||
* | |||
* @return void | |||
*/ | |||
protected function commands() | |||
{ | |||
require base_path('routes/console.php'); | |||
} | |||
} |
@ -0,0 +1,65 @@ | |||
<?php | |||
namespace App\Exceptions; | |||
use Exception; | |||
use Illuminate\Auth\AuthenticationException; | |||
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; | |||
class Handler extends ExceptionHandler | |||
{ | |||
/** | |||
* A list of the exception types that should not be reported. | |||
* | |||
* @var array | |||
*/ | |||
protected $dontReport = [ | |||
\Illuminate\Auth\AuthenticationException::class, | |||
\Illuminate\Auth\Access\AuthorizationException::class, | |||
\Symfony\Component\HttpKernel\Exception\HttpException::class, | |||
\Illuminate\Database\Eloquent\ModelNotFoundException::class, | |||
\Illuminate\Session\TokenMismatchException::class, | |||
\Illuminate\Validation\ValidationException::class, | |||
]; | |||
/** | |||
* Report or log an exception. | |||
* | |||
* This is a great spot to send exceptions to Sentry, Bugsnag, etc. | |||
* | |||
* @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); | |||
} | |||
/** | |||
* 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(route('login')); | |||
} | |||
} |
@ -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,71 @@ | |||
<?php | |||
namespace App\Http\Controllers\Auth; | |||
use App\User; | |||
use App\Http\Controllers\Controller; | |||
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 User | |||
*/ | |||
protected function create(array $data) | |||
{ | |||
return User::create([ | |||
'name' => $data['name'], | |||
'email' => $data['email'], | |||
'password' => bcrypt($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,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,60 @@ | |||
<?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 = [ | |||
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class, | |||
\Illuminate\Foundation\Http\Middleware\ValidatePostSize::class, | |||
\App\Http\Middleware\TrimStrings::class, | |||
\Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull::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' => \Illuminate\Auth\Middleware\Authenticate::class, | |||
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class, | |||
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class, | |||
'can' => \Illuminate\Auth\Middleware\Authorize::class, | |||
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class, | |||
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class, | |||
]; | |||
} |
@ -0,0 +1,17 @@ | |||
<?php | |||
namespace App\Http\Middleware; | |||
use Illuminate\Cookie\Middleware\EncryptCookies as BaseEncrypter; | |||
class EncryptCookies extends BaseEncrypter | |||
{ | |||
/** | |||
* 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 BaseTrimmer; | |||
class TrimStrings extends BaseTrimmer | |||
{ | |||
/** | |||
* The names of the attributes that should not be trimmed. | |||
* | |||
* @var array | |||
*/ | |||
protected $except = [ | |||
'password', | |||
'password_confirmation', | |||
]; | |||
} |
@ -0,0 +1,17 @@ | |||
<?php | |||
namespace App\Http\Middleware; | |||
use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier; | |||
class VerifyCsrfToken extends BaseVerifier | |||
{ | |||
/** | |||
* 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,32 @@ | |||
<?php | |||
namespace App\Providers; | |||
use Illuminate\Support\Facades\Event; | |||
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; | |||
class EventServiceProvider extends ServiceProvider | |||
{ | |||
/** | |||
* The event listener mappings for the application. | |||
* | |||
* @var array | |||
*/ | |||
protected $listen = [ | |||
'App\Events\Event' => [ | |||
'App\Listeners\EventListener', | |||
], | |||
]; | |||
/** | |||
* 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,29 @@ | |||
<?php | |||
namespace App; | |||
use Illuminate\Notifications\Notifiable; | |||
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,51 @@ | |||
#!/usr/bin/env php | |||
<?php | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| 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__.'/bootstrap/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( | |||
realpath(__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,17 @@ | |||
<?php | |||
define('LARAVEL_START', microtime(true)); | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| Register The Composer 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 we do not have to manually load any of | |||
| our application's PHP classes. It just feels great to relax. | |||
| | |||
*/ | |||
require __DIR__.'/../vendor/autoload.php'; |
@ -0,0 +1,2 @@ | |||
* | |||
!.gitignore |
@ -0,0 +1,51 @@ | |||
{ | |||
"name": "laravel/laravel", | |||
"description": "The Laravel Framework.", | |||
"keywords": ["framework", "laravel"], | |||
"license": "MIT", | |||
"type": "project", | |||
"require": { | |||
"php": ">=5.6.4", | |||
"laravel/framework": "5.4.*", | |||
"laravel/tinker": "~1.0" | |||
}, | |||
"require-dev": { | |||
"fzaninotto/faker": "~1.4", | |||
"mockery/mockery": "0.9.*", | |||
"phpunit/phpunit": "~5.7" | |||
}, | |||
"autoload": { | |||
"classmap": [ | |||
"database" | |||
], | |||
"psr-4": { | |||
"App\\": "app/" | |||
} | |||
}, | |||
"autoload-dev": { | |||
"psr-4": { | |||
"Tests\\": "tests/" | |||
} | |||
}, | |||
"scripts": { | |||
"post-root-package-install": [ | |||
"php -r \"file_exists('.env') || copy('.env.example', '.env');\"" | |||
], | |||
"post-create-project-cmd": [ | |||
"php artisan key:generate" | |||
], | |||
"post-install-cmd": [ | |||
"Illuminate\\Foundation\\ComposerScripts::postInstall", | |||
"php artisan optimize" | |||
], | |||
"post-update-cmd": [ | |||
"Illuminate\\Foundation\\ComposerScripts::postUpdate", | |||
"php artisan optimize" | |||
] | |||
}, | |||
"config": { | |||
"preferred-install": "dist", | |||
"sort-packages": true, | |||
"optimize-autoloader": true | |||
} | |||
} |
@ -0,0 +1,231 @@ | |||
<?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 your 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', | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| 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', | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| Logging Configuration | |||
|-------------------------------------------------------------------------- | |||
| | |||
| Here you may configure the log settings for your application. Out of | |||
| the box, Laravel uses the Monolog PHP logging library. This gives | |||
| you a variety of powerful log handlers / formatters to utilize. | |||
| | |||
| Available Settings: "single", "daily", "syslog", "errorlog" | |||
| | |||
*/ | |||
'log' => env('APP_LOG', 'single'), | |||
'log_level' => env('APP_LOG_LEVEL', 'debug'), | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| 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... | |||
*/ | |||
Laravel\Tinker\TinkerServiceProvider::class, | |||
/* | |||
* 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,58 @@ | |||
<?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' => [ | |||
// | |||
], | |||
], | |||
'redis' => [ | |||
'driver' => 'redis', | |||
'connection' => 'default', | |||
], | |||
'log' => [ | |||
'driver' => 'log', | |||
], | |||
'null' => [ | |||
'driver' => 'null', | |||
], | |||
], | |||
]; |
@ -0,0 +1,91 @@ | |||
<?php | |||
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' => 'default', | |||
], | |||
], | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| 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' => 'laravel', | |||
]; |
@ -0,0 +1,120 @@ | |||
<?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' => '', | |||
'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' => '', | |||
'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'), | |||
'password' => env('DB_PASSWORD', ''), | |||
'charset' => 'utf8', | |||
'prefix' => '', | |||
], | |||
], | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| Migration Repository Table | |||
|-------------------------------------------------------------------------- | |||
| | |||
| This table keeps track of all the migrations that have already run for | |||
| your application. Using this information, we can determine which of | |||
| the migrations on disk haven't actually been run in the database. | |||
| | |||
*/ | |||
'migrations' => 'migrations', | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| Redis Databases | |||
|-------------------------------------------------------------------------- | |||
| | |||
| Redis is an open source, fast, and advanced key-value store that also | |||
| provides a richer set of commands than a typical key-value systems | |||
| such as APC or Memcached. Laravel makes it easy to dig right in. | |||
| | |||
*/ | |||
'redis' => [ | |||
'client' => 'predis', | |||
'default' => [ | |||
'host' => env('REDIS_HOST', '127.0.0.1'), | |||
'password' => env('REDIS_PASSWORD', null), | |||
'port' => env('REDIS_PORT', 6379), | |||
'database' => 0, | |||
], | |||
], | |||
]; |
@ -0,0 +1,68 @@ | |||
<?php | |||
return [ | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| Default Filesystem Disk | |||
|-------------------------------------------------------------------------- | |||
| | |||
| Here you may specify the default filesystem disk that should be used | |||
| by the framework. The "local" disk, as well as a variety of cloud | |||
| based disks are available to your application. Just store away! | |||
| | |||
*/ | |||
'default' => env('FILESYSTEM_DRIVER', 'local'), | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| Default Cloud Filesystem Disk | |||
|-------------------------------------------------------------------------- | |||
| | |||
| Many applications store files both locally and in the cloud. For this | |||
| reason, you may specify a default "cloud" driver here. This driver | |||
| will be bound as the Cloud disk implementation in the container. | |||
| | |||
*/ | |||
'cloud' => env('FILESYSTEM_CLOUD', 's3'), | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| Filesystem Disks | |||
|-------------------------------------------------------------------------- | |||
| | |||
| Here you may configure as many filesystem "disks" as you wish, and you | |||
| may even configure multiple disks of the same driver. Defaults have | |||
| been setup for each driver as an example of the required options. | |||
| | |||
| Supported Drivers: "local", "ftp", "s3", "rackspace" | |||
| | |||
*/ | |||
'disks' => [ | |||
'local' => [ | |||
'driver' => 'local', | |||
'root' => storage_path('app'), | |||
], | |||
'public' => [ | |||
'driver' => 'local', | |||
'root' => storage_path('app/public'), | |||
'url' => env('APP_URL').'/storage', | |||
'visibility' => 'public', | |||
], | |||
's3' => [ | |||
'driver' => 's3', | |||
'key' => env('AWS_KEY'), | |||
'secret' => env('AWS_SECRET'), | |||
'region' => env('AWS_REGION'), | |||
'bucket' => env('AWS_BUCKET'), | |||
], | |||
], | |||
]; |
@ -0,0 +1,123 @@ | |||
<?php | |||
return [ | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| Mail Driver | |||
|-------------------------------------------------------------------------- | |||
| | |||
| Laravel supports both SMTP and PHP's "mail" function as drivers for the | |||
| sending of e-mail. You may specify which one you're using throughout | |||
| your application here. By default, Laravel is setup for SMTP mail. | |||
| | |||
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses", | |||
| "sparkpost", "log", "array" | |||
| | |||
*/ | |||
'driver' => env('MAIL_DRIVER', 'smtp'), | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| SMTP Host Address | |||
|-------------------------------------------------------------------------- | |||
| | |||
| Here you may provide the host address of the SMTP server used by your | |||
| applications. A default option is provided that is compatible with | |||
| the Mailgun mail service which will provide reliable deliveries. | |||
| | |||
*/ | |||
'host' => env('MAIL_HOST', 'smtp.mailgun.org'), | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| SMTP Host Port | |||
|-------------------------------------------------------------------------- | |||
| | |||
| This is the SMTP port used by your application to deliver e-mails to | |||
| users of the application. Like the host we have set this value to | |||
| stay compatible with the Mailgun e-mail application by default. | |||
| | |||
*/ | |||
'port' => env('MAIL_PORT', 587), | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| Global "From" Address | |||
|-------------------------------------------------------------------------- | |||
| | |||
| You may wish for all e-mails sent by your application to be sent from | |||
| the same address. Here, you may specify a name and address that is | |||
| used globally for all e-mails that are sent by your application. | |||
| | |||
*/ | |||
'from' => [ | |||
'address' => env('MAIL_FROM_ADDRESS', 'hello@example.com'), | |||
'name' => env('MAIL_FROM_NAME', 'Example'), | |||
], | |||
/* | |||
|-------------------------------------------------------------------------- | |||
| E-Mail Encryption Protocol | |||
|-------------------------------------------------------------------------- | |||
| | |||
| Here you may specify the encryption protocol that should be used when | |||
| the application send e-mail messages. A sensible default using the | |||
| transport layer security protocol should provide great security. | |||
| | |||
*/ | |||
'encryption' => env('MAIL_ENCRYPTION', 'tls'), | |||
/* | |||