Laravel 6.0

This commit is contained in:
Tyler 2020-12-21 02:33:51 -05:00
parent 3449022d54
commit 12545e29e7
16 changed files with 1362 additions and 665 deletions

View File

@ -4,6 +4,7 @@ namespace App\Services\BookInformation;
use Google_Client; use Google_Client;
use Google_Service_Books; use Google_Service_Books;
use Illuminate\Support\Arr;
class GoogleBooks implements BookLookupService { class GoogleBooks implements BookLookupService {
@ -19,7 +20,7 @@ class GoogleBooks implements BookLookupService {
/** /**
* @var \Google_Service_Books_Volume * @var \Google_Service_Books_Volume
*/ */
$volume = array_first($results->getItems())->getVolumeInfo(); $volume = Arr::first($results->getItems())->getVolumeInfo();
return [ return [
'title' => $volume->getTitle(), 'title' => $volume->getTitle(),

View File

@ -9,18 +9,17 @@
"fideloper/proxy": "^4.0", "fideloper/proxy": "^4.0",
"google/apiclient": "^2.2", "google/apiclient": "^2.2",
"guzzlehttp/guzzle": "~6.0", "guzzlehttp/guzzle": "~6.0",
"laravel/framework": "5.8.*", "laravel/framework": "^6.0",
"laravel/tinker": "~1.0", "laravel/tinker": "^2.5",
"sunra/php-simple-html-dom-parser": "^1.5", "sunra/php-simple-html-dom-parser": "^1.5",
"yajra/laravel-datatables-oracle": "^9.0" "yajra/laravel-datatables-oracle": "^9.0"
}, },
"require-dev": { "require-dev": {
"beyondcode/laravel-dump-server": "^1.0", "facade/ignition": "^1.16.4",
"filp/whoops": "^2.0", "fakerphp/faker": "^1.9.1",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0", "mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0", "nunomaduro/collision": "^3.0",
"phpunit/phpunit": "^7.0" "phpunit/phpunit": "^8.5.8|^9.3.3"
}, },
"autoload": { "autoload": {
"classmap": [ "classmap": [

1787
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@ return [
| |
| This value determines the "environment" your application is currently | This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various | 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),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -54,6 +54,8 @@ return [
'url' => env('APP_URL', 'http://localhost'), 'url' => env('APP_URL', 'http://localhost'),
'asset_url' => env('ASSET_URL', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Application Timezone | Application Timezone
@ -93,6 +95,19 @@ return [
'fallback_locale' => 'en', 'fallback_locale' => 'en',
/*
|--------------------------------------------------------------------------
| Faker Locale
|--------------------------------------------------------------------------
|
| This locale will be used by the Faker PHP library when generating fake
| data for your database seeds. For example, this will be used to get
| localized telephone numbers, street address information and more.
|
*/
'faker_locale' => 'en_US',
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| Encryption Key | Encryption Key
@ -176,6 +191,7 @@ return [
'aliases' => [ 'aliases' => [
'App' => Illuminate\Support\Facades\App::class, 'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class, 'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class, 'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class, 'Blade' => Illuminate\Support\Facades\Blade::class,
@ -205,6 +221,7 @@ return [
'Schema' => Illuminate\Support\Facades\Schema::class, 'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class, 'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class, 'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class, 'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class, 'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class, 'View' => Illuminate\Support\Facades\View::class,

View File

@ -44,6 +44,7 @@ return [
'api' => [ 'api' => [
'driver' => 'token', 'driver' => 'token',
'provider' => 'users', 'provider' => 'users',
'hash' => false,
], ],
], ],
@ -96,7 +97,21 @@ return [
'provider' => 'users', 'provider' => 'users',
'table' => 'password_resets', 'table' => 'password_resets',
'expire' => 60, '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,
]; ];

View File

@ -36,7 +36,8 @@ return [
'secret' => env('PUSHER_APP_SECRET'), 'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'), 'app_id' => env('PUSHER_APP_ID'),
'options' => [ 'options' => [
// 'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
], ],
], ],

View File

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Str;
return [ return [
/* /*
@ -11,7 +13,8 @@ return [
| using this caching library. This connection is used when another is | using this caching library. This connection is used when another is
| not explicitly specified when executing a given caching function. | not explicitly specified when executing a given caching function.
| |
| Supported: "apc", "array", "database", "file", "memcached", "redis" | Supported: "apc", "array", "database", "file",
| "memcached", "redis", "dynamodb"
| |
*/ */
@ -57,7 +60,7 @@ return [
env('MEMCACHED_PASSWORD'), env('MEMCACHED_PASSWORD'),
], ],
'options' => [ 'options' => [
// Memcached::OPT_CONNECT_TIMEOUT => 2000, // Memcached::OPT_CONNECT_TIMEOUT => 2000,
], ],
'servers' => [ 'servers' => [
[ [
@ -70,7 +73,16 @@ return [
'redis' => [ 'redis' => [
'driver' => '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 +98,6 @@ return [
| |
*/ */
'prefix' => env( 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
'CACHE_PREFIX',
str_slug(env('APP_NAME', 'laravel'), '_').'_cache'
),
]; ];

View File

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Str;
return [ return [
/* /*
@ -35,12 +37,15 @@ return [
'sqlite' => [ 'sqlite' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')), 'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '', 'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
], ],
'mysql' => [ 'mysql' => [
'driver' => 'mysql', 'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'), 'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -50,12 +55,17 @@ return [
'charset' => 'utf8mb4', 'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci', 'collation' => 'utf8mb4_unicode_ci',
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true,
'strict' => true, 'strict' => true,
'engine' => null, 'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
], ],
'pgsql' => [ 'pgsql' => [
'driver' => 'pgsql', 'driver' => 'pgsql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', '127.0.0.1'), 'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '5432'), 'port' => env('DB_PORT', '5432'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -63,12 +73,14 @@ return [
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8', 'charset' => 'utf8',
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true,
'schema' => 'public', 'schema' => 'public',
'sslmode' => 'prefer', 'sslmode' => 'prefer',
], ],
'sqlsrv' => [ 'sqlsrv' => [
'driver' => 'sqlsrv', 'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'), 'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '1433'), 'port' => env('DB_PORT', '1433'),
'database' => env('DB_DATABASE', 'forge'), 'database' => env('DB_DATABASE', 'forge'),
@ -76,6 +88,7 @@ return [
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8', 'charset' => 'utf8',
'prefix' => '', 'prefix' => '',
'prefix_indexes' => true,
], ],
], ],
@ -99,20 +112,34 @@ return [
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| Redis is an open source, fast, and advanced key-value store that also | 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. | such as APC or Memcached. Laravel makes it easy to dig right in.
| |
*/ */
'redis' => [ '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' => [ 'default' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'), 'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null), 'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379), 'port' => env('REDIS_PORT', '6379'),
'database' => 0, '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' => env('REDIS_CACHE_DB', '1'),
], ],
], ],

View File

@ -37,7 +37,7 @@ return [
| may even configure multiple disks of the same driver. Defaults have | may even configure multiple disks of the same driver. Defaults have
| been setup for each driver as an example of the required options. | been setup for each driver as an example of the required options.
| |
| Supported Drivers: "local", "ftp", "s3", "rackspace" | Supported Drivers: "local", "ftp", "sftp", "s3"
| |
*/ */
@ -61,6 +61,8 @@ return [
'secret' => env('AWS_SECRET_ACCESS_KEY'), 'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'), 'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'), 'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
], ],
], ],

View File

@ -11,7 +11,7 @@ return [
| passwords for your application. By default, the bcrypt algorithm is | passwords for your application. By default, the bcrypt algorithm is
| used; however, you remain free to modify this option if you wish. | used; however, you remain free to modify this option if you wish.
| |
| Supported: "bcrypt", "argon" | Supported: "bcrypt", "argon", "argon2id"
| |
*/ */

View File

@ -1,6 +1,8 @@
<?php <?php
use Monolog\Handler\NullHandler;
use Monolog\Handler\StreamHandler; use Monolog\Handler\StreamHandler;
use Monolog\Handler\SyslogUdpHandler;
return [ return [
@ -36,6 +38,7 @@ return [
'stack' => [ 'stack' => [
'driver' => 'stack', 'driver' => 'stack',
'channels' => ['single'], 'channels' => ['single'],
'ignore_exceptions' => false,
], ],
'single' => [ 'single' => [
@ -48,7 +51,7 @@ return [
'driver' => 'daily', 'driver' => 'daily',
'path' => storage_path('logs/laravel.log'), 'path' => storage_path('logs/laravel.log'),
'level' => 'debug', 'level' => 'debug',
'days' => 7, 'days' => 14,
], ],
'slack' => [ 'slack' => [
@ -59,9 +62,20 @@ return [
'level' => 'critical', 'level' => 'critical',
], ],
'papertrail' => [
'driver' => 'monolog',
'level' => 'debug',
'handler' => SyslogUdpHandler::class,
'handler_with' => [
'host' => env('PAPERTRAIL_URL'),
'port' => env('PAPERTRAIL_PORT'),
],
],
'stderr' => [ 'stderr' => [
'driver' => 'monolog', 'driver' => 'monolog',
'handler' => StreamHandler::class, 'handler' => StreamHandler::class,
'formatter' => env('LOG_STDERR_FORMATTER'),
'with' => [ 'with' => [
'stream' => 'php://stderr', 'stream' => 'php://stderr',
], ],
@ -76,6 +90,15 @@ return [
'driver' => 'errorlog', 'driver' => 'errorlog',
'level' => 'debug', 'level' => 'debug',
], ],
'null' => [
'driver' => 'monolog',
'handler' => NullHandler::class,
],
'emergency' => [
'path' => storage_path('logs/laravel.log'),
],
], ],
]; ];

View File

@ -11,8 +11,8 @@ return [
| sending of e-mail. You may specify which one you're using throughout | sending of e-mail. You may specify which one you're using throughout
| your application here. By default, Laravel is setup for SMTP mail. | your application here. By default, Laravel is setup for SMTP mail.
| |
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses", | Supported: "smtp", "sendmail", "mailgun", "ses",
| "sparkpost", "log", "array" | "postmark", "log", "array"
| |
*/ */
@ -120,4 +120,17 @@ return [
], ],
], ],
/*
|--------------------------------------------------------------------------
| Log Channel
|--------------------------------------------------------------------------
|
| If you are using the "log" driver, you may specify the logging channel
| if you prefer to keep mail messages separate from other log entries
| for simpler reading. Otherwise, the default channel will be used.
|
*/
'log_channel' => env('MAIL_LOG_CHANNEL'),
]; ];

View File

@ -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 | 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 | API, giving you convenient access to each back-end using the same
| syntax for each one. Here you may set the default queue driver. | syntax for every one. Here you may define a default connection.
|
| Supported: "sync", "database", "beanstalkd", "sqs", "redis", "null"
| |
*/ */
'default' => env('QUEUE_DRIVER', 'sync'), 'default' => env('QUEUE_CONNECTION', 'sync'),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -26,6 +24,8 @@ return [
| is used by your application. A default configuration has been added | is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more. | for each back-end shipped with Laravel. You are free to add more.
| |
| Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
|
*/ */
'connections' => [ 'connections' => [
@ -46,22 +46,24 @@ return [
'host' => 'localhost', 'host' => 'localhost',
'queue' => 'default', 'queue' => 'default',
'retry_after' => 90, 'retry_after' => 90,
'block_for' => 0,
], ],
'sqs' => [ 'sqs' => [
'driver' => 'sqs', 'driver' => 'sqs',
'key' => 'your-public-key', 'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => 'your-secret-key', 'secret' => env('AWS_SECRET_ACCESS_KEY'),
'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id', 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
'queue' => 'your-queue-name', 'queue' => env('SQS_QUEUE', 'your-queue-name'),
'region' => 'us-east-1', 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
], ],
'redis' => [ 'redis' => [
'driver' => 'redis', 'driver' => 'redis',
'connection' => 'default', 'connection' => 'default',
'queue' => 'default', 'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90, 'retry_after' => 90,
'block_for' => null,
], ],
], ],
@ -78,6 +80,7 @@ return [
*/ */
'failed' => [ 'failed' => [
'driver' => env('QUEUE_FAILED_DRIVER', 'database'),
'database' => env('DB_CONNECTION', 'mysql'), 'database' => env('DB_CONNECTION', 'mysql'),
'table' => 'failed_jobs', 'table' => 'failed_jobs',
], ],

View File

@ -8,31 +8,26 @@ return [
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| This file is for storing the credentials for third party services such | This file is for storing the credentials for third party services such
| as Stripe, Mailgun, SparkPost and others. This file provides a sane | as Mailgun, Postmark, AWS and more. This file provides the de facto
| default location for this type of information, allowing packages | location for this type of information, allowing packages to have
| to have a conventional place to find your various credentials. | a conventional file to locate the various service credentials.
| |
*/ */
'mailgun' => [ 'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'), 'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'), 'secret' => env('MAILGUN_SECRET'),
'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
],
'postmark' => [
'token' => env('POSTMARK_TOKEN'),
], ],
'ses' => [ 'ses' => [
'key' => env('SES_KEY'), 'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('SES_SECRET'), 'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => 'us-east-1', 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'sparkpost' => [
'secret' => env('SPARKPOST_SECRET'),
],
'stripe' => [
'model' => App\User::class,
'key' => env('STRIPE_KEY'),
'secret' => env('STRIPE_SECRET'),
], ],
]; ];

View File

@ -1,5 +1,7 @@
<?php <?php
use Illuminate\Support\Str;
return [ return [
/* /*
@ -12,7 +14,7 @@ return [
| you may specify any of the other wonderful drivers provided here. | you may specify any of the other wonderful drivers provided here.
| |
| Supported: "file", "cookie", "database", "apc", | Supported: "file", "cookie", "database", "apc",
| "memcached", "redis", "array" | "memcached", "redis", "dynamodb", "array"
| |
*/ */
@ -70,7 +72,7 @@ return [
| |
*/ */
'connection' => null, 'connection' => env('SESSION_CONNECTION', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -90,13 +92,13 @@ return [
| Session Cache Store | Session Cache Store
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
| |
| When using the "apc" or "memcached" session drivers, you may specify a | When using the "apc", "memcached", or "dynamodb" session drivers you may
| cache store that should be used for these sessions. This value must | list a cache store that should be used for these sessions. This value
| correspond with one of the application's configured cache stores. | must match with one of the application's configured cache "stores".
| |
*/ */
'store' => null, 'store' => env('SESSION_STORE', null),
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -124,7 +126,7 @@ return [
'cookie' => env( 'cookie' => env(
'SESSION_COOKIE', 'SESSION_COOKIE',
str_slug(env('APP_NAME', 'laravel'), '_').'_session' Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
), ),
/* /*
@ -188,7 +190,7 @@ return [
| take place, and can be used to mitigate CSRF attacks. By default, we | take place, and can be used to mitigate CSRF attacks. By default, we
| do not enable this as other CSRF protection services are in place. | do not enable this as other CSRF protection services are in place.
| |
| Supported: "lax", "strict" | Supported: "lax", "strict", "none"
| |
*/ */

View File

@ -28,6 +28,9 @@ return [
| |
*/ */
'compiled' => realpath(storage_path('framework/views')), 'compiled' => env(
'VIEW_COMPILED_PATH',
realpath(storage_path('framework/views'))
),
]; ];