Browse Source

Laravel5.8→7にバージョンアップ

bash
テクニカル諏訪子 1 year ago
parent
commit
8e6b00b885
  1. 38
      .env.example
  2. 36
      README.md
  3. 3
      app/Console/Kernel.php
  4. 18
      app/Exceptions/Handler.php
  5. 2
      app/Http/Controllers/BoardController.php
  6. 4
      app/Http/Controllers/Controller.php
  7. 10
      app/Http/Controllers/ImageController.php
  8. 2
      app/Http/Controllers/SiteController.php
  9. 12
      app/Http/Controllers/UserController.php
  10. 17
      app/Http/Kernel.php
  11. 21
      app/Http/Middleware/Authenticate.php
  12. 17
      app/Http/Middleware/CheckForMaintenanceMode.php
  13. 3
      app/Http/Middleware/RedirectIfAuthenticated.php
  14. 20
      app/Http/Middleware/TrustHosts.php
  15. 13
      app/Http/Middleware/TrustProxies.php
  16. 3
      app/Http/Middleware/VerifyCsrfToken.php
  17. 12
      app/Providers/AppServiceProvider.php
  18. 4
      app/Providers/AuthServiceProvider.php
  19. 2
      app/Providers/BroadcastServiceProvider.php
  20. 8
      app/Providers/EventServiceProvider.php
  21. 19
      app/Providers/RouteServiceProvider.php
  22. 19
      app/User.php
  23. 2
      bootstrap/app.php
  24. 121
      composer.json
  25. 40
      config/app.php
  26. 15
      config/auth.php
  27. 2
      config/broadcasting.php
  28. 24
      config/cache.php
  29. 33
      config/cors.php
  30. 35
      config/database.php
  31. 28
      config/filesystems.php
  32. 34
      config/hashing.php
  33. 38
      config/logging.php
  34. 117
      config/mail.php
  35. 21
      config/queue.php
  36. 25
      config/services.php
  37. 26
      config/session.php
  38. 5
      config/view.php
  39. 1
      database/.gitignore
  40. 13
      database/factories/UserFactory.php
  41. 10
      database/migrations/2014_10_12_000000_create_users_table.php
  42. 32
      database/migrations/2014_10_12_100000_create_password_resets_table.php
  43. 35
      database/migrations/2019_08_19_000000_create_failed_jobs_table.php
  44. 4
      database/seeds/DatabaseSeeder.php
  45. 1
      hooks/hooks.json
  46. 30
      package.json
  47. 30
      phpunit.xml
  48. 2
      public/.htaccess
  49. 0
      public/fonts/jpserriffont.woff
  50. 0
      public/img/bash/6fd97df9bfea41748061893ce36cefee.jpeg
  51. 0
      public/img/bash/81004208_p0.jpg
  52. 0
      public/img/bash/app_icon.png
  53. 0
      public/img/bash/bottom_bg.png
  54. 0
      public/img/bash/bottom_left.png
  55. 0
      public/img/bash/bottom_right.png
  56. 0
      public/img/bash/left_bg.png
  57. 0
      public/img/bash/right_bg.png
  58. 0
      public/img/bash/root_bg.png
  59. 0
      public/img/bash/top_bg.png
  60. 0
      public/img/bash/top_left.png
  61. 0
      public/img/bash/top_max.png
  62. 0
      public/img/bash/top_max_hover.png
  63. 0
      public/img/bash/top_min.png
  64. 0
      public/img/bash/top_min_hover.png
  65. 0
      public/img/bash/top_right.png
  66. 0
      public/img/bash/top_right_hover.png
  67. 0
      public/img/bash/user_bg.png
  68. 0
      public/img/bitchute.png
  69. 0
      public/img/discord.png
  70. 0
      public/img/favicon.jpeg
  71. 0
      public/img/flag/ASEAN.png
  72. 0
      public/img/flag/Afghanistan.png
  73. 0
      public/img/flag/African Union(OAS).png
  74. 0
      public/img/flag/Albania.png
  75. 0
      public/img/flag/Algeria.png
  76. 0
      public/img/flag/American Samoa.png
  77. 0
      public/img/flag/Andorra.png
  78. 0
      public/img/flag/Angola.png
  79. 0
      public/img/flag/Anguilla.png
  80. 0
      public/img/flag/Antarctica.png
  81. 0
      public/img/flag/Antigua & Barbuda.png
  82. 0
      public/img/flag/Arab League.png
  83. 0
      public/img/flag/Argentina.png
  84. 0
      public/img/flag/Armenia.png
  85. 0
      public/img/flag/Aruba.png
  86. 0
      public/img/flag/Australia.png
  87. 0
      public/img/flag/Austria.png
  88. 0
      public/img/flag/Azerbaijan.png
  89. 0
      public/img/flag/Bahamas.png
  90. 0
      public/img/flag/Bahrain.png
  91. 0
      public/img/flag/Bangladesh.png
  92. 0
      public/img/flag/Barbados.png
  93. 0
      public/img/flag/Belarus.png
  94. 0
      public/img/flag/Belgium.png
  95. 0
      public/img/flag/Belize.png
  96. 0
      public/img/flag/Benin.png
  97. 0
      public/img/flag/Bermuda.png
  98. 0
      public/img/flag/Bhutan.png
  99. 0
      public/img/flag/Bolivia.png
  100. 0
      public/img/flag/Bosnia & Herzegovina.png

38
.env.example

@ -2,59 +2,45 @@ APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
FRONTEND=http://localhost:8080
LOG_CHANNEL=stack
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
FTP_HOST=ftp.example.com
FTP_USER=username
FTP_PASS=password
FTP_PORT=21
FTP_SSL=false
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_MAILER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
MAIL_FROM_ADDRESS=null
MAIL_FROM_NAME="${APP_NAME}"
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
JWT_SECRET=
JWT_TTL=131500
JWT_REFRESH_TTL=525600
JWT_BLACKLIST_GRACE_PERIOD=30
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
GMO_KEY=""
GMO_SECRET=""
CONOHA_DENANT_ID=""
CONOHA_DENANT_NAME=""
CONOHA_USER_NAME=""
CONOHA_USER_PASS=""

36
readme.md → README.md

@ -1,4 +1,4 @@
<p align="center"><img src="https://laravel.com/assets/img/components/logo-laravel.svg"></p>
<p align="center"><img src="https://res.cloudinary.com/dtfbvvkyp/image/upload/v1566331377/laravel-logolockup-cmyk-red.svg" width="400"></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>
@ -9,7 +9,7 @@
## 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:
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 takes the pain out of development by easing common tasks used in many web projects, such as:
- [Simple, fast routing engine](https://laravel.com/docs/routing).
- [Powerful dependency injection container](https://laravel.com/docs/container).
@ -19,22 +19,28 @@ Laravel is a web application framework with expressive, elegant syntax. We belie
- [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.
Laravel is accessible, powerful, and provides tools required for large, robust applications.
## Learning Laravel
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of any modern web application framework, making it a breeze to get started learning the framework.
Laravel has the most extensive and thorough [documentation](https://laravel.com/docs) and video tutorial library of all modern web application frameworks, making it a breeze to get started with the framework.
If you're not in the mood to read, [Laracasts](https://laracasts.com) contains over 1100 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.
If you don't feel like reading, [Laracasts](https://laracasts.com) can help. Laracasts contains over 1500 video tutorials on a range of topics including Laravel, modern PHP, unit testing, and JavaScript. Boost your skills 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](https://patreon.com/taylorotwell):
We would like to extend our thanks to the following sponsors for funding Laravel development. If you are interested in becoming a sponsor, please visit the Laravel [Patreon page](https://patreon.com/taylorotwell).
- **[Vehikl](https://vehikl.com/)**
- **[Tighten Co.](https://tighten.co)**
- **[Kirschbaum Development Group](https://kirschbaumdevelopment.com)**
- **[British Software Development](https://www.britishsoftware.co)**
- **[64 Robots](https://64robots.com)**
- **[Cubet Techno Labs](https://cubettech.com)**
- **[Cyber-Duck](https://cyber-duck.co.uk)**
- **[Many](https://www.many.co.uk)**
- **[Webdock, Fast VPS Hosting](https://www.webdock.io/en)**
- **[DevSquad](https://devsquad.com)**
- [UserInsights](https://userinsights.com)
- [Fragrantica](https://www.fragrantica.com)
- [SOFTonSOFA](https://softonsofa.com/)
- [User10](https://user10.com)
@ -42,14 +48,28 @@ We would like to extend our thanks to the following sponsors for helping fund on
- [CodeBrisk](https://codebrisk.com)
- [1Forge](https://1forge.com)
- [TECPRESSO](https://tecpresso.co.jp/)
- [Pulse Storm](http://www.pulsestorm.net/)
- [Runtime Converter](http://runtimeconverter.com/)
- [WebL'Agence](https://weblagence.com/)
- [Invoice Ninja](https://www.invoiceninja.com)
- [iMi digital](https://www.imi-digital.de/)
- [Earthlink](https://www.earthlink.ro/)
- [Steadfast Collective](https://steadfastcollective.com/)
- [We Are The Robots Inc.](https://watr.mx/)
- [Understand.io](https://www.understand.io/)
- [Abdel Elrafa](https://abdelelrafa.com)
- [Hyper Host](https://hyper.host)
- [Appoly](https://www.appoly.co.uk)
- [OP.GG](https://op.gg)
- [云软科技](http://www.yunruan.ltd/)
## Contributing
Thank you for considering contributing to the Laravel framework! The contribution guide can be found in the [Laravel documentation](https://laravel.com/docs/contributions).
## Code of Conduct
In order to ensure that the Laravel community is welcoming to all, please review and abide by the [Code of Conduct](https://laravel.com/docs/contributions#code-of-conduct).
## Security Vulnerabilities
If you discover a security vulnerability within Laravel, please send an e-mail to Taylor Otwell via [taylor@laravel.com](mailto:taylor@laravel.com). All security vulnerabilities will be promptly addressed.

3
app/Console/Kernel.php

@ -24,8 +24,7 @@ class Kernel extends ConsoleKernel
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
// $schedule->command('inspire')->hourly();
}
/**

18
app/Exceptions/Handler.php

@ -2,8 +2,8 @@
namespace App\Exceptions;
use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
use Throwable;
class Handler extends ExceptionHandler
{
@ -29,12 +29,12 @@ class Handler extends ExceptionHandler
/**
* Report or log an exception.
*
* This is a great spot to send exceptions to Sentry, Bugsnag, etc.
*
* @param \Exception $exception
* @param \Throwable $exception
* @return void
*
* @throws \Exception
*/
public function report(Exception $exception)
public function report(Throwable $exception)
{
parent::report($exception);
}
@ -43,10 +43,12 @@ class Handler extends ExceptionHandler
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
* @param \Throwable $exception
* @return \Symfony\Component\HttpFoundation\Response
*
* @throws \Throwable
*/
public function render($request, Exception $exception)
public function render($request, Throwable $exception)
{
return parent::render($request, $exception);
}

2
app/Http/Controllers/BoardController.php

@ -1811,7 +1811,7 @@ class BoardController extends Controller {
'footer' => $i->footer,
'member_title' => $i->member_title,
'gender' => $i->gender,
'avatar' => ($i->avatar ? $i->avatar : 'assets/avatars/haznoavaz.png'),
'avatar' => ($i->avatar ? $i->avatar : '/usericon/haznoavaz.png'),
'showcol' => $showCol,
'showname' => $showName,
'showgroup' => $showGroupName,

4
app/Http/Controllers/Controller.php

@ -2,10 +2,10 @@
namespace App\Http\Controllers;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Routing\Controller as BaseController;
class Controller extends BaseController {
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

10
app/Http/Controllers/ImageController.php

@ -68,7 +68,7 @@ class ImageController extends Controller {
$res[] = array(
'id' => basename($img),
'avatar' => $protocol.'://'.$_SERVER['SERVER_NAME'].'/'.($user[0]->avatar != '' ? $user[0]->avatar : 'assets/avatars/haznoavaz.png'),
'avatar' => $protocol.'://'.$_SERVER['SERVER_NAME'].'/'.($user[0]->avatar != '' ? $user[0]->avatar : '/usericon/haznoavaz.png'),
'userCol' => $showCol,
'userName' => $showName
);
@ -123,7 +123,7 @@ class ImageController extends Controller {
$res[] = array(
'id' => $usr[3],
'avatar' => $protocol.'://'.$_SERVER['SERVER_NAME'].'/'.($user[0]->avatar != '' ? $user[0]->avatar : 'assets/avatars/haznoavaz.png'),
'avatar' => $protocol.'://'.$_SERVER['SERVER_NAME'].'/'.($user[0]->avatar != '' ? $user[0]->avatar : '/usericon/haznoavaz.png'),
'name' => $img->getFilename(),
'userCol' => $showCol,
'userName' => $showName,
@ -190,7 +190,7 @@ class ImageController extends Controller {
$res[] = array(
'id' => $usr[3],
'avatar' => $protocol.'://'.$_SERVER['SERVER_NAME'].'/'.($user[0]->avatar != '' ? $user[0]->avatar : 'assets/avatars/haznoavaz.png'),
'avatar' => $protocol.'://'.$_SERVER['SERVER_NAME'].'/'.($user[0]->avatar != '' ? $user[0]->avatar : '/usericon/haznoavaz.png'),
'name' => $img->getFilename(),
'userCol' => $showCol,
'userName' => $showName,
@ -252,7 +252,7 @@ class ImageController extends Controller {
$res[] = array(
'id' => $id,
'avatar' => $protocol.'://'.$_SERVER['SERVER_NAME'].'/'.($user[0]->avatar != '' ? $user[0]->avatar : 'assets/avatars/haznoavaz.png'),
'avatar' => $protocol.'://'.$_SERVER['SERVER_NAME'].'/'.($user[0]->avatar != '' ? $user[0]->avatar : '/usericon/haznoavaz.png'),
'name' => $img->getFilename(),
'userCol' => $showCol,
'userName' => $showName,
@ -325,7 +325,7 @@ class ImageController extends Controller {
$res[] = array(
'id' => $usr,
'avatar' => $protocol.'://'.$_SERVER['SERVER_NAME'].'/'.($user[0]->avatar != '' ? $user[0]->avatar : 'assets/avatars/haznoavaz.png'),
'avatar' => $protocol.'://'.$_SERVER['SERVER_NAME'].'/'.($user[0]->avatar != '' ? $user[0]->avatar : '/usericon/haznoavaz.png'),
'name' => $img->getFilename(),
'userCol' => $showCol,
'userName' => $showName,

2
app/Http/Controllers/SiteController.php

@ -277,7 +277,7 @@ class SiteController extends Controller {
'isDeleted' => $i->isDeleted,
'message' => $i->message,
'ip_address' => $i->ip_address,
'avatar' => ($i->avatar ? $i->avatar : 'assets/avatars/haznoavaz.png'),
'avatar' => ($i->avatar ? $i->avatar : '/usericon/haznoavaz.png'),
'showcol' => $showCol,
'showname' => $showName
]);

12
app/Http/Controllers/UserController.php

@ -33,7 +33,7 @@ class UserController extends Controller {
$get = DB::table('users')->where('id', $id)->first();
$get->profile = DB::table('usr_profile')->where('user_id', $id)->first();
$get->profile->showname = (!empty($get->profile->display_name) && !is_null($get->profile->display_name) ? $get->profile->display_name : $get->username);
if (empty($get->avatar) || $get->avatar == '') $get->avatar = 'assets/avatars/haznoavaz.png';
if (empty($get->avatar) || $get->avatar == '') $get->avatar = '/usericon/haznoavaz.png';
return $get;
}
@ -59,7 +59,7 @@ class UserController extends Controller {
$get->perm_id = DB::table('usr_perm_id')->where('user_id', $id)->first();
$get->perm_module = DB::table('usr_perm_module')->where('usr_perm_id', $get->perm_id->usr_per_id)->first();
if (is_null($get->profile->avatar) || empty($get->profile->avatar) || $get->profile->avatar == '') {
$get->profile->avatar = 'http'.(isset($_SERVER['HTTPS']) ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/assets/avatars/haznoavaz.png';
$get->profile->avatar = 'http'.(isset($_SERVER['HTTPS']) ? 's' : '').'://'.$_SERVER['HTTP_HOST'].'/usericon/haznoavaz.png';
}
else $get->profile->avatar = '/'.$get->profile->avatar;
@ -112,17 +112,17 @@ class UserController extends Controller {
if ($valid['usr_editprofile'] == 1) {
if (isset($r->filename)) {
if (!is_dir("assets/avatars/".$check)) {
if (!mkdir("assets/avatars/".$check, 0755, true)) return "Could not make folder ".$check."<br />";
if (!is_dir('/usericon/'.$check)) {
if (!mkdir('/usericon/'.$check, 0755, true)) return 'Could not make folder '.$check.'<br />';
}
$img_dir = "assets/avatars/".$check."/";
$img_dir = '/usericon/'.$check.'/';
$image = $img_dir . $r->filename;
$imageFileType = array('image/png', 'image/jpeg', 'image/gif');
if (!in_array($r->filetype, $imageFileType)) return "Only JPG, PNG, JPEG, and GIF are allowed.";
$fname = 'assets/avatars/'.$user.'/'.$r->filename;
$fname = '/usericon/'.$user.'/'.$r->filename;
$data = base64_decode(preg_replace('#^data:image/\w+;base64,#i', '', $r->thefile));
Storage::disk('public')->put($fname, $data);

17
app/Http/Kernel.php

@ -14,12 +14,13 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
// \App\Http\Middleware\TrustHosts::class,
\App\Http\Middleware\TrustProxies::class,
\Fruitcake\Cors\HandleCors::class,
\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,
\Barryvdh\Cors\HandleCors::class,
];
/**
@ -34,13 +35,13 @@ class Kernel extends HttpKernel
\Illuminate\Session\Middleware\StartSession::class,
// \Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
// \App\Http\Middleware\VerifyCsrfToken::class,
\App\Http\Middleware\VerifyCsrfToken::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
'api' => [
'throttle:60,1',
'bindings',
\Illuminate\Routing\Middleware\SubstituteBindings::class,
],
];
@ -52,13 +53,15 @@ class Kernel extends HttpKernel
* @var array
*/
protected $routeMiddleware = [
'auth' => \Illuminate\Auth\Middleware\Authenticate::class,
'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,
'jwt.auth' => \Tymon\JWTAuth\Middleware\GetUserFromToken::class,
'password.confirm' => \Illuminate\Auth\Middleware\RequirePassword::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];
}

21
app/Http/Middleware/Authenticate.php

@ -0,0 +1,21 @@
<?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|null
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}

17
app/Http/Middleware/CheckForMaintenanceMode.php

@ -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 = [
//
];
}

3
app/Http/Middleware/RedirectIfAuthenticated.php

@ -2,6 +2,7 @@
namespace App\Http\Middleware;
use App\Providers\RouteServiceProvider;
use Closure;
use Illuminate\Support\Facades\Auth;
@ -18,7 +19,7 @@ class RedirectIfAuthenticated
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/home');
return redirect(RouteServiceProvider::HOME);
}
return $next($request);

20
app/Http/Middleware/TrustHosts.php

@ -0,0 +1,20 @@
<?php
namespace App\Http\Middleware;
use Illuminate\Http\Middleware\TrustHosts as Middleware;
class TrustHosts extends Middleware
{
/**
* Get the host patterns that should be trusted.
*
* @return array
*/
public function hosts()
{
return [
$this->allSubdomainsOfApplicationUrl(),
];
}
}

13
app/Http/Middleware/TrustProxies.php

@ -2,29 +2,22 @@
namespace App\Http\Middleware;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
use Illuminate\Http\Request;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array
* @var array|string|null
*/
protected $proxies;
/**
* The headers that should be used to detect proxies.
*
* @var string
* @var int
*/
protected $headers = Request::HEADER_X_FORWARDED_ALL;
// protected $headers = [
// Request::HEADER_FORWARDED => 'FORWARDED',
// Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
// Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
// Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
// Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
// ];
}

3
app/Http/Middleware/VerifyCsrfToken.php

@ -12,7 +12,6 @@ class VerifyCsrfToken extends Middleware
* @var array
*/
protected $except = [
'api/auth/*',
'api/rpc/*'
//
];
}

12
app/Providers/AppServiceProvider.php

@ -7,24 +7,22 @@ use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
* Register any application services.
*
* @return void
*/
public function boot()
public function register()
{
//
}
/**
* Register any application services.
* Bootstrap any application services.
*
* @return void
*/
public function register()
public function boot()
{
if ($this->app->environment() == 'local') {
$this->app->register(\Reliese\Coders\CodersServiceProvider::class);
}
//
}
}

4
app/Providers/AuthServiceProvider.php

@ -2,8 +2,8 @@
namespace App\Providers;
use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Gate;
class AuthServiceProvider extends ServiceProvider
{
@ -13,7 +13,7 @@ class AuthServiceProvider extends ServiceProvider
* @var array
*/
protected $policies = [
'App\Model' => 'App\Policies\ModelPolicy',
// 'App\Model' => 'App\Policies\ModelPolicy',
];
/**

2
app/Providers/BroadcastServiceProvider.php

@ -2,8 +2,8 @@
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Broadcast;
use Illuminate\Support\ServiceProvider;
class BroadcastServiceProvider extends ServiceProvider
{

8
app/Providers/EventServiceProvider.php

@ -2,8 +2,10 @@
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;
use Illuminate\Support\Facades\Event;
class EventServiceProvider extends ServiceProvider
{
@ -13,8 +15,8 @@ class EventServiceProvider extends ServiceProvider
* @var array
*/
protected $listen = [
'App\Events\Event' => [
'App\Listeners\EventListener',
Registered::class => [
SendEmailVerificationNotification::class,
],
];

19
app/Providers/RouteServiceProvider.php

@ -2,8 +2,8 @@
namespace App\Providers;
use Illuminate\Support\Facades\Route;
use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider;
use Illuminate\Support\Facades\Route;
class RouteServiceProvider extends ServiceProvider
{
@ -16,6 +16,13 @@ class RouteServiceProvider extends ServiceProvider
*/
protected $namespace = 'App\Http\Controllers';
/**
* The path to the "home" route for your application.
*
* @var string
*/
public const HOME = '/home';
/**
* Define your route model bindings, pattern filters, etc.
*
@ -52,8 +59,8 @@ class RouteServiceProvider extends ServiceProvider
protected function mapWebRoutes()
{
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
->namespace($this->namespace)
->group(base_path('routes/web.php'));
}
/**
@ -66,8 +73,8 @@ class RouteServiceProvider extends ServiceProvider
protected function mapApiRoutes()
{
Route::prefix('api')
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
->middleware('api')
->namespace($this->namespace)
->group(base_path('routes/api.php'));
}
}

19
app/User.php

@ -3,10 +3,11 @@
namespace App;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable {
class User extends Authenticatable
{
use Notifiable;
/**
@ -15,7 +16,7 @@ class User extends Authenticatable {
* @var array
*/
protected $fillable = [
'username', 'email', 'password',
'name', 'email', 'password',
];
/**
@ -24,7 +25,15 @@ class User extends Authenticatable {
* @var array
*/
protected $hidden = [
'password', 'salt', 'remember_token',
'password', 'remember_token',
];
/**
* The attributes that should be cast to native types.
*
* @var array
*/
protected $casts = [
'email_verified_at' => 'datetime',
];
}
?>

2
bootstrap/app.php

@ -12,7 +12,7 @@
*/
$app = new Illuminate\Foundation\Application(
realpath(__DIR__.'/../')
$_ENV['APP_BASE_PATH'] ?? dirname(__DIR__)
);
/*

121
composer.json

@ -1,64 +1,63 @@
{
"name": "laravel/laravel",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"type": "project",
"require": {
"php": ">=7.1.3",
"barryvdh/laravel-cors": "^0.11.2",
"fideloper/proxy": "^4.0",
"laravel/framework": "5.8.*",
"laravel/tinker": "^1.0.8",
"predis/predis": "^1.1.1",
"stripe/stripe-php": "^6.37"
},
"require-dev": {
"filp/whoops": "^2.3.1",
"fzaninotto/faker": "^1.8",
"mockery/mockery": "^1.2.2",
"nunomaduro/collision": "^2.1.1",
"phpunit/phpunit": "^8.0.4",
"reliese/laravel": "^0.0.13",
"symfony/thanks": "^1.1.0"
},
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"psr-4": {
"App\\": "app/"
"license": "MIT",
"require": {
"php": "^7.2.5",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^1.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.0",
"laravel/tinker": "^2.0"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
},
"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"
],
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover"
]
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
}

40
config/app.php

@ -13,7 +13,7 @@ return [
|
*/
'name' => env('APP_NAME', '076 Server'),
'name' => env('APP_NAME', 'テクニカル諏訪子'),
/*
|--------------------------------------------------------------------------
@ -22,7 +22,7 @@ return [
|
| 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.
| services the application utilizes. Set this in your ".env" file.
|
*/
@ -39,7 +39,7 @@ return [
|
*/
'debug' => env('APP_DEBUG', false),
'debug' => (bool) env('APP_DEBUG', false),
/*
|--------------------------------------------------------------------------
@ -53,7 +53,8 @@ return [
*/
'url' => env('APP_URL', 'http://localhost'),
'api_url' => env('APP_API_URL', 'http://localhost/api'),
'asset_url' => env('ASSET_URL', null),
/*
|--------------------------------------------------------------------------
@ -96,35 +97,31 @@ return [
/*
|--------------------------------------------------------------------------
| Encryption Key
| Faker Locale
|--------------------------------------------------------------------------
|
| 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!
| 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.
|
*/
'key' => env('APP_KEY'),
'cipher' => 'AES-256-CBC',
'faker_locale' => 'ja_JP',
/*
|--------------------------------------------------------------------------
| Logging Configuration
| Encryption Key
|--------------------------------------------------------------------------
|
| 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"
| 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!
|
*/
'log' => env('APP_LOG', 'single'),
'key' => env('APP_KEY'),
'log_level' => env('APP_LOG_LEVEL', 'debug'),
'cipher' => 'AES-256-CBC',
/*
|--------------------------------------------------------------------------
@ -183,7 +180,7 @@ return [
/*
|--------------------------------------------------------------------------
| 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
@ -194,6 +191,7 @@ return [
'aliases' => [
'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
@ -209,6 +207,7 @@ return [
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
@ -223,6 +222,7 @@ return [
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,

15
config/auth.php

@ -44,6 +44,7 @@ return [
'api' => [
'driver' => 'token',
'provider' => 'users',
'hash' => false,
],
],
@ -96,7 +97,21 @@ return [
'provider' => 'users',
'table' => 'password_resets',
'expire' => 60,
'throttle' => 60,
],
],
/*
|--------------------------------------------------------------------------
| Password Confirmation Timeout
|--------------------------------------------------------------------------
|
| Here you may define the amount of seconds before a password confirmation
| times out and the user is prompted to re-enter their password via the
| confirmation screen. By default, the timeout lasts for three hours.
|
*/
'password_timeout' => 10800,
];

2
config/broadcasting.php

@ -37,7 +37,7 @@ return [
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'encrypted' => true,
'useTLS' => true,
],
],

24
config/cache.php

@ -1,5 +1,7 @@
<?php
use Illuminate\Support\Str;
return [
/*
@ -11,7 +13,8 @@ return [
| 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"
| Supported: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb"
|
*/
@ -36,6 +39,7 @@ return [
'array' => [
'driver' => 'array',
'serialize' => false,
],
'database' => [
@ -57,7 +61,7 @@ return [
env('MEMCACHED_PASSWORD'),
],
'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
// Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
@ -70,7 +74,16 @@ return [
'redis' => [
'driver' => 'redis',
'connection' => 'default',
'connection' => 'cache',
],
'dynamodb' => [
'driver' => 'dynamodb',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
'table' => env('DYNAMODB_CACHE_TABLE', 'cache'),
'endpoint' => env('DYNAMODB_ENDPOINT'),
],
],
@ -86,9 +99,6 @@ return [
|
*/
'prefix' => env(
'CACHE_PREFIX',
str_slug(env('APP_NAME', 'laravel'), '_').'_cache'
),
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
];

33
config/cors.php

@ -4,20 +4,31 @@ return [
/*
|--------------------------------------------------------------------------
| Laravel CORS
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| allowedOrigins, allowedHeaders and allowedMethods can be set to array('*')
| to accept any value.
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/
'supportsCredentials' => false,
'allowedOrigins' => ['*'],
'allowedOriginsPatterns' => [],
'allowedHeaders' => ['*'],
'allowedMethods' => ['*'],
'exposedHeaders' => [],
'maxAge' => 0,
'paths' => ['api/*'],
'allowed_methods' => ['*'],
'allowed_origins' => ['*'],
'allowed_origins_patterns' => [],
'allowed_headers' => ['*'],
'exposed_headers' => [],
'max_age' => 0,
'supports_credentials' => false,
];

35
config/database.php

@ -1,5 +1,7 @@
<?php
use Illuminate\Support\Str;
return [
/*
@ -35,12 +37,15 @@ return [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'),
@ -50,12 +55,17 @@ return [
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
'pgsql' => [
'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'),
@ -63,12 +73,14 @@ return [
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public',
'sslmode' => 'prefer',
],
'sqlsrv' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'),
@ -76,6 +88,7 @@ return [
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
],
],
@ -99,20 +112,34 @@ return [
|--------------------------------------------------------------------------
|
| 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
| provides a richer body of commands than a typical key-value system
| such as APC or Memcached. Laravel makes it easy to dig right in.
|
*/
'redis' => [
'client' => 'predis',
'client' => env('REDIS_CLIENT', 'phpredis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env('REDIS_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'),
],
'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_DB', '0'),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => 0,
'port' => env('REDIS_PORT', '6379'),
'database' => env('REDIS_CACHE_DB', '1'),
],
],

28
config/filesystems.php

@ -37,22 +37,12 @@ return [
| 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", "sftp", "s3", "rackspace"
| Supported Drivers: "local", "ftp", "sftp", "s3"
|
*/
'disks' => [
'ftp' => [
'driver' => 'ftp',
'host' => env('FTP_HOST'),
'username' => env('FTP_USER'),
'password' => env('FTP_PASS'),
'port' => env('FTP_PORT'),
'ssl' => env('FTP_SSL'),
'root' => storage_path('app/public/store'),
],
'local' => [
'driver' => 'local',
'root' => storage_path('app'),
@ -72,8 +62,24 @@ return [
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
],
],
/*
|--------------------------------------------------------------------------
| Symbolic Links
|--------------------------------------------------------------------------
|
| Here you may configure the symbolic links that will be created when the
| `storage:link` Artisan command is executed. The array keys should be
| the locations of the links and the values should be their targets.
|
*/
'links' => [
public_path('storage') => storage_path('app/public'),
],
];

34
config/hashing.php

@ -11,10 +11,42 @@ return [
| passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish.
|
| Supported: "bcrypt", "argon"
| Supported: "bcrypt", "argon", "argon2id"
|
*/
'driver' => 'bcrypt',
/*
|--------------------------------------------------------------------------
| Bcrypt Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Bcrypt algorithm. This will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'bcrypt' => [
'rounds' => env('BCRYPT_ROUNDS', 10),
],
/*
|--------------------------------------------------------------------------
| Argon Options
|--------------------------------------------------------------------------
|
| Here you may specify the configuration options that should be used when
| passwords are hashed using the Argon algorithm. These will allow you
| to control the amount of time it takes to hash the given password.
|
*/
'argon' => [
'memory' => 1024,
'threads' => 2,
'time' => 2,
],
];

38
config/logging.php

@ -1,5 +1,9 @@
<?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [
/*
@ -25,7 +29,8 @@ return [
| you a variety of powerful log handlers / formatters to utilize.
|
| Available Drivers: "single", "daily", "slack", "syslog",
| "errorlog", "custom", "stack"
| "errorlog", "monolog",
| "custom", "stack"
|
*/
@ -33,6 +38,7 @@ return [
'stack' => [
'driver' => 'stack',
'channels' => ['single'],
'ignore_exceptions' => false,
],
'single' => [
@ -45,7 +51,7 @@ return [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 7,
'days' => 14,
],
'slack' => [
@ -56,6 +62,25 @@ return [
'level' => 'critical',
],
'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
'stderr' => [
'driver' => 'monolog',
'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [
'stream' => 'php://stderr',
],
],
'syslog' => [
'driver' => 'syslog',
'level' => 'debug',
@ -65,6 +90,15 @@ return [
'driver' => 'errorlog',
'level' => 'debug',
],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
],
];

117
config/mail.php

@ -4,45 +4,73 @@ return [
/*
|--------------------------------------------------------------------------
| Mail Driver
| Default Mailer
|--------------------------------------------------------------------------
|
| 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"
| This option controls the default mailer that is used to send any email
| messages sent by your application. Alternative mailers may be setup
| and used as needed; however, this mailer will be used by default.
|
*/
'driver' => env('MAIL_DRIVER', 'smtp'),
'default' => env('MAIL_MAILER', 'smtp'),
/*
|--------------------------------------------------------------------------
| SMTP Host Address
| Mailer Configurations
|--------------------------------------------------------------------------
|
| 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.
| Here you may configure all of the mailers used by your application plus
| their respective settings. Several examples have been configured for
| you and you are free to add your own as your application requires.
|
*/
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
/*
|--------------------------------------------------------------------------
| SMTP Host Port
|--------------------------------------------------------------------------
| Laravel supports a variety of mail "transport" drivers to be used while
| sending an e-mail. You will specify which one you are using for your
| mailers below. You are free to add additional mailers as required.
|
| 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.
| Supported: "smtp", "sendmail", "mailgun", "ses",
| "postmark", "log", "array"
|
*/
'port' => env('MAIL_PORT', 587),
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'auth_mode' => null,
],
'ses' => [
'transport' => 'ses',
],
'mailgun' => [
'transport' => 'mailgun',
],
'postmark' => [
'transport' => 'postmark',
],
'sendmail' => [
'transport' => 'sendmail',
'path' => '/usr/sbin/sendmail -bs',
],
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
'array' => [
'transport' => 'array',
],
],
/*
|--------------------------------------------------------------------------
@ -60,47 +88,6 @@ return [
'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'),
/*
|--------------------------------------------------------------------------
| SMTP Server Username
|--------------------------------------------------------------------------
|
| If your SMTP server requires a username for authentication, you should
| set it here. This will get used to authenticate with your server on
| connection. You may also set the "password" value below this one.
|
*/
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
/*
|--------------------------------------------------------------------------
| Sendmail System Path
|--------------------------------------------------------------------------
|
| When using the "sendmail" driver to send e-mails, we will need to know
| the path to where Sendmail lives on this server. A default path has
| been provided here, which will work well on most of your systems.
|
*/
'sendmail' => '/usr/sbin/sendmail -bs',
/*
|--------------------------------------------------------------------------
| Markdown Mail Settings

21
config/queue.php

@ -4,18 +4,16 @@ return [
/*
|--------------------------------------------------------------------------
| Default Queue Driver
| Default Queue Connection Name
|--------------------------------------------------------------------------
|
| Laravel's queue API supports an assortment of back-ends via a single
| API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver.
|
| Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
| syntax for every one. Here you may define a default connection.
|
*/