Skip to content
Permalink
Browse files

new laravel 6 project

  • Loading branch information
aaronpk committed Oct 7, 2019
0 parents commit d3c5a6802bb5b757548fc3b3eaecbaa7688a3c3a
Showing with 13,464 additions and 0 deletions.
  1. +15 −0 .editorconfig
  2. +44 −0 .env.example
  3. +5 −0 .gitattributes
  4. +12 −0 .gitignore
  5. +16 −0 .styleci.yml
  6. +42 −0 app/Console/Kernel.php
  7. +51 −0 app/Exceptions/Handler.php
  8. +14 −0 app/Http/Controllers/Controller.php
  9. +81 −0 app/Http/Kernel.php
  10. +21 −0 app/Http/Middleware/Authenticate.php
  11. +17 −0 app/Http/Middleware/CheckForMaintenanceMode.php
  12. +17 −0 app/Http/Middleware/EncryptCookies.php
  13. +26 −0 app/Http/Middleware/RedirectIfAuthenticated.php
  14. +18 −0 app/Http/Middleware/TrimStrings.php
  15. +23 −0 app/Http/Middleware/TrustProxies.php
  16. +24 −0 app/Http/Middleware/VerifyCsrfToken.php
  17. +28 −0 app/Providers/AppServiceProvider.php
  18. +30 −0 app/Providers/AuthServiceProvider.php
  19. +21 −0 app/Providers/BroadcastServiceProvider.php
  20. +34 −0 app/Providers/EventServiceProvider.php
  21. +73 −0 app/Providers/RouteServiceProvider.php
  22. +53 −0 artisan
  23. +61 −0 composer.json
  24. +4,889 −0 composer.lock
  25. +231 −0 config/app.php
  26. +103 −0 config/auth.php
  27. +59 −0 config/broadcasting.php
  28. +103 −0 config/cache.php
  29. +147 −0 config/database.php
  30. +69 −0 config/filesystems.php
  31. +52 −0 config/hashing.php
  32. +100 −0 config/logging.php
  33. +136 −0 config/mail.php
  34. +88 −0 config/queue.php
  35. +33 −0 config/services.php
  36. +199 −0 config/session.php
  37. +36 −0 config/view.php
  38. +21 −0 package.json
  39. +33 −0 phpunit.xml
  40. +21 −0 public/.htaccess
  41. 0 public/favicon.ico
  42. +60 −0 public/index.php
  43. +2 −0 public/robots.txt
  44. +1 −0 resources/js/app.js
  45. +28 −0 resources/js/bootstrap.js
  46. +19 −0 resources/lang/en/auth.php
  47. +19 −0 resources/lang/en/pagination.php
  48. +21 −0 resources/lang/en/passwords.php
  49. +150 −0 resources/lang/en/validation.php
  50. +1 −0 resources/sass/app.scss
  51. +95 −0 resources/views/welcome.blade.php
  52. +18 −0 routes/api.php
  53. +16 −0 routes/channels.php
  54. +18 −0 routes/console.php
  55. +19 −0 routes/web.php
  56. +21 −0 server.php
  57. +3 −0 storage/app/.gitignore
  58. +2 −0 storage/app/public/.gitignore
  59. +8 −0 storage/framework/.gitignore
  60. +3 −0 storage/framework/cache/.gitignore
  61. +2 −0 storage/framework/cache/data/.gitignore
  62. +2 −0 storage/framework/sessions/.gitignore
  63. +2 −0 storage/framework/testing/.gitignore
  64. +2 −0 storage/framework/views/.gitignore
  65. +2 −0 storage/logs/.gitignore
  66. +22 −0 tests/CreatesApplication.php
  67. +21 −0 tests/Feature/ExampleTest.php
  68. +10 −0 tests/TestCase.php
  69. +19 −0 tests/Unit/ExampleTest.php
  70. +15 −0 webpack.mix.js
  71. +5,817 −0 yarn.lock
@@ -0,0 +1,15 @@
root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2
@@ -0,0 +1,44 @@
APP_NAME=Laravel
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost

LOG_CHANNEL=stack

DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=

BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
SESSION_DRIVER=file
SESSION_LIFETIME=120

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

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

MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
@@ -0,0 +1,5 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
CHANGELOG.md export-ignore
@@ -0,0 +1,12 @@
/node_modules
/public/hot
/public/storage
/storage/*.key
/vendor
.env
.env.backup
.phpunit.result.cache
Homestead.json
Homestead.yaml
npm-debug.log
yarn-error.log
@@ -0,0 +1,16 @@
php:
preset: laravel
enabled:
- alpha_ordered_imports
disabled:
- length_ordered_imports
- unused_use
finder:
not-name:
- index.php
- server.php
js:
finder:
not-name:
- webpack.mix.js
css: true
@@ -0,0 +1,42 @@
<?php

namespace App\Console;

use Illuminate\Console\Scheduling\Schedule;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;

class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
*/
protected $commands = [
//
];

/**
* Define the application's command schedule.
*
* @param \Illuminate\Console\Scheduling\Schedule $schedule
* @return void
*/
protected function schedule(Schedule $schedule)
{
// $schedule->command('inspire')
// ->hourly();
}

/**
* Register the commands for the application.
*
* @return void
*/
protected function commands()
{
$this->load(__DIR__.'/Commands');

require base_path('routes/console.php');
}
}
@@ -0,0 +1,51 @@
<?php

namespace App\Exceptions;

use Exception;
use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;

class Handler extends ExceptionHandler
{
/**
* A list of the exception types that are not reported.
*
* @var array
*/
protected $dontReport = [
//
];

/**
* A list of the inputs that are never flashed for validation exceptions.
*
* @var array
*/
protected $dontFlash = [
'password',
'password_confirmation',
];

/**
* Report or log an exception.
*
* @param \Exception $exception
* @return void
*/
public function report(Exception $exception)
{
parent::report($exception);
}

/**
* Render an exception into an HTTP response.
*
* @param \Illuminate\Http\Request $request
* @param \Exception $exception
* @return \Illuminate\Http\Response
*/
public function render($request, Exception $exception)
{
return parent::render($request, $exception);
}
}
@@ -0,0 +1,14 @@
<?php

namespace App\Http\Controllers;

use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Routing\Controller as BaseController;

class Controller extends BaseController
{
use AuthorizesRequests, DispatchesJobs, ValidatesRequests;

}
@@ -0,0 +1,81 @@
<?php

namespace App\Http;

use Illuminate\Foundation\Http\Kernel as HttpKernel;

class Kernel extends HttpKernel
{
/**
* The application's global HTTP middleware stack.
*
* These middleware are run during every request to your application.
*
* @var array
*/
protected $middleware = [
\App\Http\Middleware\TrustProxies::class,
\App\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' => \App\Http\Middleware\Authenticate::class,
'auth.basic' => \Illuminate\Auth\Middleware\AuthenticateWithBasicAuth::class,
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
'signed' => \Illuminate\Routing\Middleware\ValidateSignature::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'verified' => \Illuminate\Auth\Middleware\EnsureEmailIsVerified::class,
];

/**
* The priority-sorted list of middleware.
*
* This forces non-global middleware to always be in the given order.
*
* @var array
*/
protected $middlewarePriority = [
\Illuminate\Session\Middleware\StartSession::class,
\Illuminate\View\Middleware\ShareErrorsFromSession::class,
\App\Http\Middleware\Authenticate::class,
\Illuminate\Routing\Middleware\ThrottleRequests::class,
\Illuminate\Session\Middleware\AuthenticateSession::class,
\Illuminate\Routing\Middleware\SubstituteBindings::class,
\Illuminate\Auth\Middleware\Authorize::class,
];
}
@@ -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
*/
protected function redirectTo($request)
{
if (! $request->expectsJson()) {
return route('login');
}
}
}
@@ -0,0 +1,17 @@
<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode as Middleware;

class CheckForMaintenanceMode extends Middleware
{
/**
* The URIs that should be reachable while maintenance mode is enabled.
*
* @var array
*/
protected $except = [
//
];
}
@@ -0,0 +1,17 @@
<?php

namespace App\Http\Middleware;

use Illuminate\Cookie\Middleware\EncryptCookies as Middleware;

class EncryptCookies extends Middleware
{
/**
* The names of the cookies that should not be encrypted.
*
* @var array
*/
protected $except = [
//
];
}
@@ -0,0 +1,26 @@
<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Support\Facades\Auth;

class RedirectIfAuthenticated
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string|null $guard
* @return mixed
*/
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
return redirect('/home');
}

return $next($request);
}
}
@@ -0,0 +1,18 @@
<?php

namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\TrimStrings as Middleware;

class TrimStrings extends Middleware
{
/**
* The names of the attributes that should not be trimmed.
*
* @var array
*/
protected $except = [
'password',
'password_confirmation',
];
}

0 comments on commit d3c5a68

Please sign in to comment.
You can’t perform that action at this time.