diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..6f313c6
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,15 @@
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+insert_final_newline = true
+indent_style = space
+indent_size = 4
+trim_trailing_whitespace = true
+
+[*.md]
+trim_trailing_whitespace = false
+
+[*.yml]
+indent_size = 2
diff --git a/.env.example b/.env.example
index 9954bf4..6241919 100644
--- a/.env.example
+++ b/.env.example
@@ -1,22 +1,26 @@
-APP_ENV="local"
+APP_NAME=Coaster
+APP_ENV=local
APP_KEY=
APP_DEBUG=true
-APP_LOG_LEVEL="info"
-APP_URL="http://localhost"
+APP_URL=http://localhost
-DB_CONNECTION="mysql"
-DB_HOST="127.0.0.1"
+LOG_CHANNEL=stack
+
+DB_CONNECTION=mysql
+DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE="coaster_db"
DB_USERNAME="coaster_usr"
DB_PASSWORD="secret"
DB_PREFIX=
-CACHE_DRIVER="file"
-SESSION_DRIVER="file"
-QUEUE_DRIVER="sync"
+BROADCAST_DRIVER=log
+CACHE_DRIVER=file
+QUEUE_CONNECTION=sync
+SESSION_DRIVER=file
+SESSION_LIFETIME=120
-REDIS_HOST="127.0.0.1"
+REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
@@ -27,6 +31,15 @@ MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
-PUSHER_KEY=
-PUSHER_SECRET=
+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}"
diff --git a/.gitattributes b/.gitattributes
index a8763f8..967315d 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,3 +1,5 @@
* text=auto
*.css linguist-vendored
*.scss linguist-vendored
+*.js linguist-vendored
+CHANGELOG.md export-ignore
diff --git a/.gitignore b/.gitignore
index ee20920..d508254 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,7 +1,13 @@
-/vendor
+/.idea
/node_modules
+/public/hot
/public/storage
-/.idea
-Homestead.yaml
-Homestead.json
+/storage/*.key
+/vendor
.env
+.env.backup
+.phpunit.result.cache
+Homestead.json
+Homestead.yaml
+npm-debug.log
+yarn-error.log
diff --git a/.styleci.yml b/.styleci.yml
new file mode 100644
index 0000000..0aa0604
--- /dev/null
+++ b/.styleci.yml
@@ -0,0 +1,16 @@
+php:
+ preset: laravel
+ enabled:
+ - length_ordered_imports
+ disabled:
+ - alpha_ordered_imports
+ - unused_use
+ finder:
+ not-name:
+ - index.php
+ - server.php
+js:
+ finder:
+ not-name:
+ - webpack.mix.js
+css: true
diff --git a/README.md b/README.md
index fcfb107..8c3249b 100644
--- a/README.md
+++ b/README.md
@@ -20,7 +20,7 @@ The repository for Coaster CMS (coastercms.org) a Laravel based Content Manageme
We aim to make Coaster CMS as feature rich as possible. Built upon the Laravel PHP framework, Coaster CMS is both fast and secure. Create beautiful content with TinyMCE and take a look into the future with the Internet Of Things.
-* Built with Laravel 5 (v5.5)
+* Built with Laravel 5 (v5.8)
* Responsive file manager
* WYSIWYG editor
* Block based templating system
@@ -71,8 +71,8 @@ For more details go to https://www.coastercms.org/documentation/developer-
## Add to an Existing Project
-If you'd rather add Coaster CMS to an existing Laravel (v5.5) project, follow the steps through below:
+If you'd rather add Coaster CMS to an existing Laravel (v5.8) project, follow the steps through below:
-1. Add "web-feet/coasterframework": "5.5.*" to the composer.json file and run composer update
+1. Add "web-feet/coasterframework": "5.8.*" to the composer.json file and run composer update
2. Add the service providers CoasterCms\CmsServiceProvider::class and CoasterCms\Providers\CoasterRoutesProvider::class, to your config/app.php file (make sure the routes provider is below any app providers as it has some catch all routes).
3. Run the script php artisan coaster:update-assets
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php
index 622e774..a8c5158 100644
--- a/app/Console/Kernel.php
+++ b/app/Console/Kernel.php
@@ -29,12 +29,14 @@ protected function schedule(Schedule $schedule)
}
/**
- * Register the Closure based commands for the application.
+ * Register the commands for the application.
*
* @return void
*/
protected function commands()
{
+ $this->load(__DIR__.'/Commands');
+
require base_path('routes/console.php');
}
}
diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php
index a747e31..043cad6 100644
--- a/app/Exceptions/Handler.php
+++ b/app/Exceptions/Handler.php
@@ -3,29 +3,31 @@
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.
+ * A list of the exception types that are not 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.
+ * A list of the inputs that are never flashed for validation exceptions.
*
- * This is a great spot to send exceptions to Sentry, Bugsnag, etc.
+ * @var array
+ */
+ protected $dontFlash = [
+ 'password',
+ 'password_confirmation',
+ ];
+
+ /**
+ * Report or log an exception.
*
* @param \Exception $exception
* @return void
@@ -46,20 +48,4 @@ 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'));
- }
}
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index b2aa275..f9f02c0 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -14,7 +14,8 @@ class Kernel extends HttpKernel
* @var array
*/
protected $middleware = [
- \Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class,
+ \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,
@@ -52,8 +53,26 @@ class Kernel extends HttpKernel
'auth' => \Illuminate\Auth\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,
+ \Illuminate\Session\Middleware\AuthenticateSession::class,
+ \Illuminate\Routing\Middleware\SubstituteBindings::class,
+ \Illuminate\Auth\Middleware\Authorize::class,
];
}
diff --git a/app/Http/Middleware/CheckForMaintenanceMode.php b/app/Http/Middleware/CheckForMaintenanceMode.php
new file mode 100644
index 0000000..35b9824
--- /dev/null
+++ b/app/Http/Middleware/CheckForMaintenanceMode.php
@@ -0,0 +1,17 @@
+ 'App\Policies\ModelPolicy',
+ // 'App\Model' => 'App\Policies\ModelPolicy',
];
/**
diff --git a/artisan b/artisan
index 44dc07b..5c23e2e 100755
--- a/artisan
+++ b/artisan
@@ -1,6 +1,8 @@
#!/usr/bin/env php
=7.1",
+ "fideloper/proxy": "^4.0",
"doctrine/dbal": "2.9.*",
"laravel/framework": "5.8.*",
"web-feet/coasterframework": "5.8.*"
@@ -33,12 +34,18 @@
"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');\""
+ "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
- "php artisan key:generate"
+ "@php artisan key:generate --ansi"
],
"post-install-cmd": [
"Illuminate\\Foundation\\ComposerScripts::postInstall",
diff --git a/config/app.php b/config/app.php
index 6138f95..bcacabe 100644
--- a/config/app.php
+++ b/config/app.php
@@ -10,6 +10,7 @@
| 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', 'Coaster CMS'),
@@ -21,7 +22,7 @@
|
| 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.
|
*/
@@ -53,6 +54,8 @@
'url' => env('APP_URL', 'http://localhost'),
+ 'asset_url' => env('ASSET_URL', null),
+
/*
|--------------------------------------------------------------------------
| Application Timezone
@@ -94,35 +97,31 @@
/*
|--------------------------------------------------------------------------
- | 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' => 'en_US',
/*
|--------------------------------------------------------------------------
- | 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',
/*
|--------------------------------------------------------------------------
@@ -176,7 +175,7 @@
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
-
+
/*
* Package Service Providers...
*/
@@ -198,6 +197,7 @@
'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,
@@ -227,6 +227,7 @@
'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,
diff --git a/config/auth.php b/config/auth.php
index 7817501..897dc82 100644
--- a/config/auth.php
+++ b/config/auth.php
@@ -44,6 +44,7 @@
'api' => [
'driver' => 'token',
'provider' => 'users',
+ 'hash' => false,
],
],
diff --git a/config/broadcasting.php b/config/broadcasting.php
index 5eecd2b..3bba110 100644
--- a/config/broadcasting.php
+++ b/config/broadcasting.php
@@ -36,7 +36,8 @@
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
- //
+ 'cluster' => env('PUSHER_APP_CLUSTER'),
+ 'useTLS' => true,
],
],
diff --git a/config/cache.php b/config/cache.php
index e87f032..46751e6 100644
--- a/config/cache.php
+++ b/config/cache.php
@@ -1,5 +1,7 @@
[
- // Memcached::OPT_CONNECT_TIMEOUT => 2000,
+ // Memcached::OPT_CONNECT_TIMEOUT => 2000,
],
'servers' => [
[
@@ -70,7 +73,16 @@
'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,6 +98,6 @@
|
*/
- 'prefix' => 'laravel',
+ 'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_').'_cache'),
];
diff --git a/config/database.php b/config/database.php
index 3ec6e79..f9ad05a 100644
--- a/config/database.php
+++ b/config/database.php
@@ -1,5 +1,7 @@
[
'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 @@
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => env('DB_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 @@
'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 @@
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'prefix' => '',
+ 'prefix_indexes' => true,
],
],
@@ -99,20 +112,34 @@
|--------------------------------------------------------------------------
|
| 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', 'predis'),
+
+ 'options' => [
+ 'cluster' => env('REDIS_CLUSTER', 'predis'),
+ '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,
+ 'database' => env('REDIS_CACHE_DB', 1),
],
],
diff --git a/config/filesystems.php b/config/filesystems.php
index 4544f60..77fa5de 100644
--- a/config/filesystems.php
+++ b/config/filesystems.php
@@ -37,7 +37,7 @@
| 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"
+ | Supported Drivers: "local", "ftp", "sftp", "s3", "rackspace"
|
*/
@@ -57,10 +57,11 @@
's3' => [
'driver' => 's3',
- 'key' => env('AWS_KEY'),
- 'secret' => env('AWS_SECRET'),
- 'region' => env('AWS_REGION'),
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ 'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
+ 'url' => env('AWS_URL'),
],
],
diff --git a/config/hashing.php b/config/hashing.php
new file mode 100644
index 0000000..8425770
--- /dev/null
+++ b/config/hashing.php
@@ -0,0 +1,52 @@
+ '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,
+ ],
+
+];
diff --git a/config/logging.php b/config/logging.php
new file mode 100644
index 0000000..d09cd7d
--- /dev/null
+++ b/config/logging.php
@@ -0,0 +1,94 @@
+ env('LOG_CHANNEL', 'stack'),
+
+ /*
+ |--------------------------------------------------------------------------
+ | Log Channels
+ |--------------------------------------------------------------------------
+ |
+ | Here you may configure the log channels 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 Drivers: "single", "daily", "slack", "syslog",
+ | "errorlog", "monolog",
+ | "custom", "stack"
+ |
+ */
+
+ 'channels' => [
+ 'stack' => [
+ 'driver' => 'stack',
+ 'channels' => ['daily'],
+ 'ignore_exceptions' => false,
+ ],
+
+ 'single' => [
+ 'driver' => 'single',
+ 'path' => storage_path('logs/laravel.log'),
+ 'level' => 'debug',
+ ],
+
+ 'daily' => [
+ 'driver' => 'daily',
+ 'path' => storage_path('logs/laravel.log'),
+ 'level' => 'debug',
+ 'days' => 14,
+ ],
+
+ 'slack' => [
+ 'driver' => 'slack',
+ 'url' => env('LOG_SLACK_WEBHOOK_URL'),
+ 'username' => 'Laravel Log',
+ 'emoji' => ':boom:',
+ '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',
+ ],
+
+ 'errorlog' => [
+ 'driver' => 'errorlog',
+ 'level' => 'debug',
+ ],
+ ],
+
+];
diff --git a/config/mail.php b/config/mail.php
index bb92224..6f8469f 100644
--- a/config/mail.php
+++ b/config/mail.php
@@ -12,7 +12,7 @@
| your application here. By default, Laravel is setup for SMTP mail.
|
| Supported: "smtp", "sendmail", "mailgun", "mandrill", "ses",
- | "sparkpost", "log", "array"
+ | "sparkpost", "postmark", "log", "array"
|
*/
@@ -120,4 +120,17 @@
],
],
+ /*
+ |--------------------------------------------------------------------------
+ | 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'),
+
];
diff --git a/config/queue.php b/config/queue.php
index 4d83ebd..07c7d2a 100644
--- a/config/queue.php
+++ b/config/queue.php
@@ -4,18 +4,16 @@
/*
|--------------------------------------------------------------------------
- | 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.
|
*/
- 'default' => env('QUEUE_DRIVER', 'sync'),
+ 'default' => env('QUEUE_CONNECTION', 'sync'),
/*
|--------------------------------------------------------------------------
@@ -26,6 +24,8 @@
| is used by your application. A default configuration has been added
| for each back-end shipped with Laravel. You are free to add more.
|
+ | Drivers: "sync", "database", "beanstalkd", "sqs", "redis", "null"
+ |
*/
'connections' => [
@@ -46,22 +46,24 @@
'host' => 'localhost',
'queue' => 'default',
'retry_after' => 90,
+ 'block_for' => 0,
],
'sqs' => [
'driver' => 'sqs',
- 'key' => 'your-public-key',
- 'secret' => 'your-secret-key',
- 'prefix' => 'https://sqs.us-east-1.amazonaws.com/your-account-id',
- 'queue' => 'your-queue-name',
- 'region' => 'us-east-1',
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ 'prefix' => env('SQS_PREFIX', 'https://sqs.us-east-1.amazonaws.com/your-account-id'),
+ 'queue' => env('SQS_QUEUE', 'your-queue-name'),
+ 'region' => env('AWS_DEFAULT_REGION', 'us-east-1'),
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
- 'queue' => 'default',
+ 'queue' => env('REDIS_QUEUE', 'default'),
'retry_after' => 90,
+ 'block_for' => null,
],
],
diff --git a/config/services.php b/config/services.php
index 4460f0e..8ce6cc6 100644
--- a/config/services.php
+++ b/config/services.php
@@ -8,31 +8,30 @@
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
- | as Stripe, Mailgun, SparkPost and others. This file provides a sane
- | default location for this type of information, allowing packages
- | to have a conventional place to find your various credentials.
+ | as Mailgun, SparkPost and others. This file provides a sane default
+ | location for this type of information, allowing packages to have
+ | a conventional file to locate the various service credentials.
|
*/
'mailgun' => [
'domain' => env('MAILGUN_DOMAIN'),
'secret' => env('MAILGUN_SECRET'),
+ 'endpoint' => env('MAILGUN_ENDPOINT', 'api.mailgun.net'),
+ ],
+
+ 'postmark' => [
+ 'token' => env('POSTMARK_TOKEN'),
],
'ses' => [
- 'key' => env('SES_KEY'),
- 'secret' => env('SES_SECRET'),
- 'region' => 'us-east-1',
+ 'key' => env('AWS_ACCESS_KEY_ID'),
+ 'secret' => env('AWS_SECRET_ACCESS_KEY'),
+ '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'),
- ],
-
];
diff --git a/config/session.php b/config/session.php
index e2779ad..fbb9b4d 100644
--- a/config/session.php
+++ b/config/session.php
@@ -1,5 +1,7 @@
120,
+ 'lifetime' => env('SESSION_LIFETIME', 120),
'expire_on_close' => false,
@@ -70,7 +72,7 @@
|
*/
- 'connection' => null,
+ 'connection' => env('SESSION_CONNECTION', null),
/*
|--------------------------------------------------------------------------
@@ -90,13 +92,13 @@
| Session Cache Store
|--------------------------------------------------------------------------
|
- | When using the "apc" or "memcached" session drivers, you may specify a
- | cache store that should be used for these sessions. This value must
- | correspond with one of the application's configured cache stores.
+ | When using the "apc", "memcached", or "dynamodb" session drivers you may
+ | list a cache store that should be used for these sessions. This value
+ | must match with one of the application's configured cache "stores".
|
*/
- 'store' => null,
+ 'store' => env('SESSION_STORE', null),
/*
|--------------------------------------------------------------------------
@@ -122,7 +124,10 @@
|
*/
- 'cookie' => 'laravel_session',
+ 'cookie' => env(
+ 'SESSION_COOKIE',
+ Str::slug(env('APP_NAME', 'laravel'), '_').'_session'
+ ),
/*
|--------------------------------------------------------------------------
@@ -176,4 +181,19 @@
'http_only' => true,
+ /*
+ |--------------------------------------------------------------------------
+ | Same-Site Cookies
+ |--------------------------------------------------------------------------
+ |
+ | This option determines how your cookies behave when cross-site requests
+ | 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.
+ |
+ | Supported: "lax", "strict"
+ |
+ */
+
+ 'same_site' => null,
+
];
diff --git a/config/view.php b/config/view.php
index 2acfd9c..22b8a18 100644
--- a/config/view.php
+++ b/config/view.php
@@ -28,6 +28,9 @@
|
*/
- 'compiled' => realpath(storage_path('framework/views')),
+ 'compiled' => env(
+ 'VIEW_COMPILED_PATH',
+ realpath(storage_path('framework/views'))
+ ),
];
diff --git a/database/.gitignore b/database/.gitignore
index 9b1dffd..97fc976 100644
--- a/database/.gitignore
+++ b/database/.gitignore
@@ -1 +1,2 @@
*.sqlite
+*.sqlite-journal
diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php
index 7833a68..7be3749 100644
--- a/database/factories/ModelFactory.php
+++ b/database/factories/ModelFactory.php
@@ -10,4 +10,3 @@
| database. Just tell the factory how a default model should look.
|
*/
-
diff --git a/database/seeds/DatabaseSeeder.php b/database/seeds/DatabaseSeeder.php
index 0b788d2..a00cd78 100644
--- a/database/seeds/DatabaseSeeder.php
+++ b/database/seeds/DatabaseSeeder.php
@@ -5,7 +5,7 @@
class DatabaseSeeder extends Seeder
{
/**
- * Run the database seeds.
+ * Seed the application's database.
*
* @return void
*/
diff --git a/package.json b/package.json
index 9d99cf3..bf85f38 100644
--- a/package.json
+++ b/package.json
@@ -1,21 +1,25 @@
{
- "private": true,
- "scripts": {
- "dev": "npm run development",
- "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
- "watch": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --watch --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
- "watch-poll": "npm run watch -- --watch-poll",
- "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
- "prod": "npm run production",
- "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
- },
- "devDependencies": {
- "axios": "^0.19.0",
- "bootstrap-sass": "^3.3.7",
- "cross-env": "^3.2.3",
- "jquery": "^3.1.1",
- "laravel-mix": "0.*",
- "lodash": "^4.17.4",
- "vue": "^2.1.10"
- }
+ "private": true,
+ "scripts": {
+ "dev": "npm run development",
+ "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
+ "watch": "npm run development -- --watch",
+ "watch-poll": "npm run watch -- --watch-poll",
+ "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
+ "prod": "npm run production",
+ "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
+ },
+ "devDependencies": {
+ "axios": "^0.19",
+ "bootstrap": "^4.1.0",
+ "cross-env": "^5.1",
+ "jquery": "^3.2",
+ "laravel-mix": "^4.0.7",
+ "lodash": "^4.17.13",
+ "popper.js": "^1.12",
+ "resolve-url-loader": "^2.3.1",
+ "sass": "^1.15.2",
+ "sass-loader": "^7.1.0",
+ "vue": "^2.5.17"
+ }
}
diff --git a/phpunit.xml b/phpunit.xml
index 9ecda83..da4add3 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -1,7 +1,7 @@
-
- ./tests/Feature
-
-
./tests/Unit
+
+
+ ./tests/Feature
+
@@ -23,9 +23,11 @@
-
-
-
-
+
+
+
+
+
+
diff --git a/public/.htaccess b/public/.htaccess
index 903f639..b75525b 100644
--- a/public/.htaccess
+++ b/public/.htaccess
@@ -1,20 +1,21 @@
- Options -MultiViews
+ Options -MultiViews -Indexes
RewriteEngine On
+ # Handle Authorization Header
+ RewriteCond %{HTTP:Authorization} .
+ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+
# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(.*)/$ /$1 [L,R=301]
+ RewriteCond %{REQUEST_URI} (.+)/$
+ RewriteRule ^ %1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
-
- # Handle Authorization Header
- RewriteCond %{HTTP:Authorization} .
- RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
diff --git a/public/index.php b/public/index.php
index 1e1d775..4584cbc 100644
--- a/public/index.php
+++ b/public/index.php
@@ -7,6 +7,8 @@
* @author Taylor Otwell
*/
+define('LARAVEL_START', microtime(true));
+
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
@@ -19,7 +21,7 @@
|
*/
-require __DIR__.'/../bootstrap/autoload.php';
+require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
diff --git a/public/web.config b/public/web.config
index 624c176..d3711d7 100644
--- a/public/web.config
+++ b/public/web.config
@@ -1,3 +1,8 @@
+
diff --git a/resources/assets/js/app.js b/resources/assets/js/app.js
deleted file mode 100644
index 29b46b8..0000000
--- a/resources/assets/js/app.js
+++ /dev/null
@@ -1,20 +0,0 @@
-
-/**
- * First we will load all of this project's JavaScript dependencies which
- * includes Vue and other libraries. It is a great starting point when
- * building robust, powerful web applications using Vue and Laravel.
- */
-
-require('./bootstrap');
-
-window.Vue = require('vue');
-
-/**
- * Next, we will create a fresh Vue application instance and attach it to
- * the page. Then, you may begin adding components to this application
- * or customize the JavaScript scaffolding to fit your unique needs.
- */
-
-const app = new Vue({
- el: '#app'
-});
diff --git a/resources/assets/js/components/.gitkeep b/resources/assets/js/components/.gitkeep
deleted file mode 100644
index e69de29..0000000
diff --git a/resources/assets/sass/_variables.scss b/resources/assets/sass/_variables.scss
deleted file mode 100644
index e69de29..0000000
diff --git a/resources/assets/sass/app.scss b/resources/assets/sass/app.scss
deleted file mode 100644
index 35ce2dc..0000000
--- a/resources/assets/sass/app.scss
+++ /dev/null
@@ -1,9 +0,0 @@
-
-// Fonts
-@import url(https://fonts.googleapis.com/css?family=Raleway:300,400,600);
-
-// Variables
-@import "variables";
-
-// Bootstrap
-@import "node_modules/bootstrap-sass/assets/stylesheets/bootstrap";
diff --git a/resources/js/app.js b/resources/js/app.js
new file mode 100644
index 0000000..61439b1
--- /dev/null
+++ b/resources/js/app.js
@@ -0,0 +1,32 @@
+/**
+ * First we will load all of this project's JavaScript dependencies which
+ * includes Vue and other libraries. It is a great starting point when
+ * building robust, powerful web applications using Vue and Laravel.
+ */
+
+require('./bootstrap');
+
+window.Vue = require('vue');
+
+/**
+ * The following block of code may be used to automatically register your
+ * Vue components. It will recursively scan this directory for the Vue
+ * components and automatically register them with their "basename".
+ *
+ * Eg. ./components/ExampleComponent.vue ->
+ */
+
+// const files = require.context('./', true, /\.vue$/i);
+// files.keys().map(key => Vue.component(key.split('/').pop().split('.')[0], files(key).default));
+
+// Vue.component('example-component', require('./components/ExampleComponent.vue').default);
+
+/**
+ * Next, we will create a fresh Vue application instance and attach it to
+ * the page. Then, you may begin adding components to this application
+ * or customize the JavaScript scaffolding to fit your unique needs.
+ */
+
+const app = new Vue({
+ el: '#app',
+});
diff --git a/resources/assets/js/bootstrap.js b/resources/js/bootstrap.js
similarity index 63%
rename from resources/assets/js/bootstrap.js
rename to resources/js/bootstrap.js
index 8e0f04e..8eaba1b 100644
--- a/resources/assets/js/bootstrap.js
+++ b/resources/js/bootstrap.js
@@ -1,4 +1,3 @@
-
window._ = require('lodash');
/**
@@ -8,9 +7,10 @@ window._ = require('lodash');
*/
try {
+ window.Popper = require('popper.js').default;
window.$ = window.jQuery = require('jquery');
- require('bootstrap-sass');
+ require('bootstrap');
} catch (e) {}
/**
@@ -23,31 +23,19 @@ window.axios = require('axios');
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
-/**
- * Next we will register the CSRF Token as a common header with Axios so that
- * all outgoing HTTP requests automatically have it attached. This is just
- * a simple convenience so we don't have to attach every token manually.
- */
-
-let token = document.head.querySelector('meta[name="csrf-token"]');
-
-if (token) {
- window.axios.defaults.headers.common['X-CSRF-TOKEN'] = token.content;
-} else {
- console.error('CSRF token not found: https://laravel.com/docs/csrf#csrf-x-csrf-token');
-}
-
/**
* Echo exposes an expressive API for subscribing to channels and listening
* for events that are broadcast by Laravel. Echo and event broadcasting
* allows your team to easily build robust real-time web applications.
*/
-// import Echo from 'laravel-echo'
+// import Echo from 'laravel-echo';
// window.Pusher = require('pusher-js');
// window.Echo = new Echo({
// broadcaster: 'pusher',
-// key: 'your-pusher-key'
+// key: process.env.MIX_PUSHER_APP_KEY,
+// cluster: process.env.MIX_PUSHER_APP_CLUSTER,
+// encrypted: true
// });
diff --git a/resources/lang/en/passwords.php b/resources/lang/en/passwords.php
index e5544d2..bf6caf6 100644
--- a/resources/lang/en/passwords.php
+++ b/resources/lang/en/passwords.php
@@ -13,7 +13,7 @@
|
*/
- 'password' => 'Passwords must be at least six characters and match the confirmation.',
+ 'password' => 'Passwords must be at least eight characters and match the confirmation.',
'reset' => 'Your password has been reset!',
'sent' => 'We have e-mailed your password reset link!',
'token' => 'This password reset token is invalid.',
diff --git a/resources/lang/en/validation.php b/resources/lang/en/validation.php
index edc036d..e1d879f 100644
--- a/resources/lang/en/validation.php
+++ b/resources/lang/en/validation.php
@@ -13,80 +13,109 @@
|
*/
- 'accepted' => 'The :attribute must be accepted.',
- 'active_url' => 'The :attribute is not a valid URL.',
- 'after' => 'The :attribute must be a date after :date.',
- 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
- 'alpha' => 'The :attribute may only contain letters.',
- 'alpha_dash' => 'The :attribute may only contain letters, numbers, and dashes.',
- 'alpha_num' => 'The :attribute may only contain letters and numbers.',
- 'array' => 'The :attribute must be an array.',
- 'before' => 'The :attribute must be a date before :date.',
- 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
- 'between' => [
+ 'accepted' => 'The :attribute must be accepted.',
+ 'active_url' => 'The :attribute is not a valid URL.',
+ 'after' => 'The :attribute must be a date after :date.',
+ 'after_or_equal' => 'The :attribute must be a date after or equal to :date.',
+ 'alpha' => 'The :attribute may only contain letters.',
+ 'alpha_dash' => 'The :attribute may only contain letters, numbers, dashes and underscores.',
+ 'alpha_num' => 'The :attribute may only contain letters and numbers.',
+ 'array' => 'The :attribute must be an array.',
+ 'before' => 'The :attribute must be a date before :date.',
+ 'before_or_equal' => 'The :attribute must be a date before or equal to :date.',
+ 'between' => [
'numeric' => 'The :attribute must be between :min and :max.',
- 'file' => 'The :attribute must be between :min and :max kilobytes.',
- 'string' => 'The :attribute must be between :min and :max characters.',
- 'array' => 'The :attribute must have between :min and :max items.',
+ 'file' => 'The :attribute must be between :min and :max kilobytes.',
+ 'string' => 'The :attribute must be between :min and :max characters.',
+ 'array' => 'The :attribute must have between :min and :max items.',
],
- 'boolean' => 'The :attribute field must be true or false.',
- 'confirmed' => 'The :attribute confirmation does not match.',
- 'date' => 'The :attribute is not a valid date.',
- 'date_format' => 'The :attribute does not match the format :format.',
- 'different' => 'The :attribute and :other must be different.',
- 'digits' => 'The :attribute must be :digits digits.',
- 'digits_between' => 'The :attribute must be between :min and :max digits.',
- 'dimensions' => 'The :attribute has invalid image dimensions.',
- 'distinct' => 'The :attribute field has a duplicate value.',
- 'email' => 'The :attribute must be a valid email address.',
- 'exists' => 'The selected :attribute is invalid.',
- 'file' => 'The :attribute must be a file.',
- 'filled' => 'The :attribute field must have a value.',
- 'image' => 'The :attribute must be an image.',
- 'in' => 'The selected :attribute is invalid.',
- 'in_array' => 'The :attribute field does not exist in :other.',
- 'integer' => 'The :attribute must be an integer.',
- 'ip' => 'The :attribute must be a valid IP address.',
- 'ipv4' => 'The :attribute must be a valid IPv4 address.',
- 'ipv6' => 'The :attribute must be a valid IPv6 address.',
- 'json' => 'The :attribute must be a valid JSON string.',
- 'max' => [
+ 'boolean' => 'The :attribute field must be true or false.',
+ 'confirmed' => 'The :attribute confirmation does not match.',
+ 'date' => 'The :attribute is not a valid date.',
+ 'date_equals' => 'The :attribute must be a date equal to :date.',
+ 'date_format' => 'The :attribute does not match the format :format.',
+ 'different' => 'The :attribute and :other must be different.',
+ 'digits' => 'The :attribute must be :digits digits.',
+ 'digits_between' => 'The :attribute must be between :min and :max digits.',
+ 'dimensions' => 'The :attribute has invalid image dimensions.',
+ 'distinct' => 'The :attribute field has a duplicate value.',
+ 'email' => 'The :attribute must be a valid email address.',
+ 'ends_with' => 'The :attribute must end with one of the following: :values',
+ 'exists' => 'The selected :attribute is invalid.',
+ 'file' => 'The :attribute must be a file.',
+ 'filled' => 'The :attribute field must have a value.',
+ 'gt' => [
+ 'numeric' => 'The :attribute must be greater than :value.',
+ 'file' => 'The :attribute must be greater than :value kilobytes.',
+ 'string' => 'The :attribute must be greater than :value characters.',
+ 'array' => 'The :attribute must have more than :value items.',
+ ],
+ 'gte' => [
+ 'numeric' => 'The :attribute must be greater than or equal :value.',
+ 'file' => 'The :attribute must be greater than or equal :value kilobytes.',
+ 'string' => 'The :attribute must be greater than or equal :value characters.',
+ 'array' => 'The :attribute must have :value items or more.',
+ ],
+ 'image' => 'The :attribute must be an image.',
+ 'in' => 'The selected :attribute is invalid.',
+ 'in_array' => 'The :attribute field does not exist in :other.',
+ 'integer' => 'The :attribute must be an integer.',
+ 'ip' => 'The :attribute must be a valid IP address.',
+ 'ipv4' => 'The :attribute must be a valid IPv4 address.',
+ 'ipv6' => 'The :attribute must be a valid IPv6 address.',
+ 'json' => 'The :attribute must be a valid JSON string.',
+ 'lt' => [
+ 'numeric' => 'The :attribute must be less than :value.',
+ 'file' => 'The :attribute must be less than :value kilobytes.',
+ 'string' => 'The :attribute must be less than :value characters.',
+ 'array' => 'The :attribute must have less than :value items.',
+ ],
+ 'lte' => [
+ 'numeric' => 'The :attribute must be less than or equal :value.',
+ 'file' => 'The :attribute must be less than or equal :value kilobytes.',
+ 'string' => 'The :attribute must be less than or equal :value characters.',
+ 'array' => 'The :attribute must not have more than :value items.',
+ ],
+ 'max' => [
'numeric' => 'The :attribute may not be greater than :max.',
- 'file' => 'The :attribute may not be greater than :max kilobytes.',
- 'string' => 'The :attribute may not be greater than :max characters.',
- 'array' => 'The :attribute may not have more than :max items.',
+ 'file' => 'The :attribute may not be greater than :max kilobytes.',
+ 'string' => 'The :attribute may not be greater than :max characters.',
+ 'array' => 'The :attribute may not have more than :max items.',
],
- 'mimes' => 'The :attribute must be a file of type: :values.',
- 'mimetypes' => 'The :attribute must be a file of type: :values.',
- 'min' => [
+ 'mimes' => 'The :attribute must be a file of type: :values.',
+ 'mimetypes' => 'The :attribute must be a file of type: :values.',
+ 'min' => [
'numeric' => 'The :attribute must be at least :min.',
- 'file' => 'The :attribute must be at least :min kilobytes.',
- 'string' => 'The :attribute must be at least :min characters.',
- 'array' => 'The :attribute must have at least :min items.',
+ 'file' => 'The :attribute must be at least :min kilobytes.',
+ 'string' => 'The :attribute must be at least :min characters.',
+ 'array' => 'The :attribute must have at least :min items.',
],
- 'not_in' => 'The selected :attribute is invalid.',
- 'numeric' => 'The :attribute must be a number.',
- 'present' => 'The :attribute field must be present.',
- 'regex' => 'The :attribute format is invalid.',
- 'required' => 'The :attribute field is required.',
- 'required_if' => 'The :attribute field is required when :other is :value.',
- 'required_unless' => 'The :attribute field is required unless :other is in :values.',
- 'required_with' => 'The :attribute field is required when :values is present.',
- 'required_with_all' => 'The :attribute field is required when :values is present.',
- 'required_without' => 'The :attribute field is required when :values is not present.',
+ 'not_in' => 'The selected :attribute is invalid.',
+ 'not_regex' => 'The :attribute format is invalid.',
+ 'numeric' => 'The :attribute must be a number.',
+ 'present' => 'The :attribute field must be present.',
+ 'regex' => 'The :attribute format is invalid.',
+ 'required' => 'The :attribute field is required.',
+ 'required_if' => 'The :attribute field is required when :other is :value.',
+ 'required_unless' => 'The :attribute field is required unless :other is in :values.',
+ 'required_with' => 'The :attribute field is required when :values is present.',
+ 'required_with_all' => 'The :attribute field is required when :values are present.',
+ 'required_without' => 'The :attribute field is required when :values is not present.',
'required_without_all' => 'The :attribute field is required when none of :values are present.',
- 'same' => 'The :attribute and :other must match.',
- 'size' => [
+ 'same' => 'The :attribute and :other must match.',
+ 'size' => [
'numeric' => 'The :attribute must be :size.',
- 'file' => 'The :attribute must be :size kilobytes.',
- 'string' => 'The :attribute must be :size characters.',
- 'array' => 'The :attribute must contain :size items.',
+ 'file' => 'The :attribute must be :size kilobytes.',
+ 'string' => 'The :attribute must be :size characters.',
+ 'array' => 'The :attribute must contain :size items.',
],
- 'string' => 'The :attribute must be a string.',
- 'timezone' => 'The :attribute must be a valid zone.',
- 'unique' => 'The :attribute has already been taken.',
- 'uploaded' => 'The :attribute failed to upload.',
- 'url' => 'The :attribute format is invalid.',
+ 'starts_with' => 'The :attribute must start with one of the following: :values',
+ 'string' => 'The :attribute must be a string.',
+ 'timezone' => 'The :attribute must be a valid zone.',
+ 'unique' => 'The :attribute has already been taken.',
+ 'uploaded' => 'The :attribute failed to upload.',
+ 'url' => 'The :attribute format is invalid.',
+ 'uuid' => 'The :attribute must be a valid UUID.',
/*
|--------------------------------------------------------------------------
@@ -110,9 +139,9 @@
| Custom Validation Attributes
|--------------------------------------------------------------------------
|
- | The following language lines are used to swap attribute place-holders
- | with something more reader friendly such as E-Mail Address instead
- | of "email". This simply helps us make messages a little cleaner.
+ | The following language lines are used to swap our attribute placeholder
+ | with something more reader friendly such as "E-Mail Address" instead
+ | of "email". This simply helps us make our message more expressive.
|
*/
diff --git a/resources/sass/_variables.scss b/resources/sass/_variables.scss
new file mode 100644
index 0000000..0407ab5
--- /dev/null
+++ b/resources/sass/_variables.scss
@@ -0,0 +1,19 @@
+// Body
+$body-bg: #f8fafc;
+
+// Typography
+$font-family-sans-serif: 'Nunito', sans-serif;
+$font-size-base: 0.9rem;
+$line-height-base: 1.6;
+
+// Colors
+$blue: #3490dc;
+$indigo: #6574cd;
+$purple: #9561e2;
+$pink: #f66d9b;
+$red: #e3342f;
+$orange: #f6993f;
+$yellow: #ffed4a;
+$green: #38c172;
+$teal: #4dc0b5;
+$cyan: #6cb2eb;
diff --git a/resources/sass/app.scss b/resources/sass/app.scss
new file mode 100644
index 0000000..3193ffa
--- /dev/null
+++ b/resources/sass/app.scss
@@ -0,0 +1,8 @@
+// Fonts
+@import url('https://fonts.googleapis.com/css?family=Nunito');
+
+// Variables
+@import 'variables';
+
+// Bootstrap
+@import '~bootstrap/scss/bootstrap';
diff --git a/resources/views/.gitignore b/resources/views/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/resources/views/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/routes/console.php b/routes/console.php
index 41e4c31..42cca27 100644
--- a/routes/console.php
+++ b/routes/console.php
@@ -11,4 +11,4 @@
| commands. Each Closure is bound to a command instance allowing a
| simple approach to interacting with each command's IO methods.
|
-*/
\ No newline at end of file
+*/
diff --git a/routes/web.php b/routes/web.php
index 9e3a2ed..cb3f0ca 100644
--- a/routes/web.php
+++ b/routes/web.php
@@ -10,5 +10,3 @@
| contains the "web" middleware group. Now create something great!
|
*/
-
-
diff --git a/storage/framework/cache/.gitignore b/storage/framework/cache/.gitignore
index d6b7ef3..01e4a6c 100644
--- a/storage/framework/cache/.gitignore
+++ b/storage/framework/cache/.gitignore
@@ -1,2 +1,3 @@
*
+!data/
!.gitignore
diff --git a/storage/framework/cache/data/.gitignore b/storage/framework/cache/data/.gitignore
new file mode 100644
index 0000000..d6b7ef3
--- /dev/null
+++ b/storage/framework/cache/data/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore
diff --git a/tests/Feature/ExampleTest.php b/tests/Feature/ExampleTest.php
index 486dc27..f31e495 100644
--- a/tests/Feature/ExampleTest.php
+++ b/tests/Feature/ExampleTest.php
@@ -3,9 +3,7 @@
namespace Tests\Feature;
use Tests\TestCase;
-use Illuminate\Foundation\Testing\WithoutMiddleware;
-use Illuminate\Foundation\Testing\DatabaseMigrations;
-use Illuminate\Foundation\Testing\DatabaseTransactions;
+use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{
diff --git a/tests/Unit/ExampleTest.php b/tests/Unit/ExampleTest.php
index 5663bb4..e9fe19c 100644
--- a/tests/Unit/ExampleTest.php
+++ b/tests/Unit/ExampleTest.php
@@ -3,8 +3,7 @@
namespace Tests\Unit;
use Tests\TestCase;
-use Illuminate\Foundation\Testing\DatabaseMigrations;
-use Illuminate\Foundation\Testing\DatabaseTransactions;
+use Illuminate\Foundation\Testing\RefreshDatabase;
class ExampleTest extends TestCase
{
diff --git a/webpack.mix.js b/webpack.mix.js
index 72fdbb1..8a923cb 100644
--- a/webpack.mix.js
+++ b/webpack.mix.js
@@ -1,4 +1,4 @@
-let mix = require('laravel-mix');
+const mix = require('laravel-mix');
/*
|--------------------------------------------------------------------------
@@ -11,5 +11,5 @@ let mix = require('laravel-mix');
|
*/
-mix.js('resources/assets/js/app.js', 'public/js')
- .sass('resources/assets/sass/app.scss', 'public/css');
+mix.js('resources/js/app.js', 'public/js')
+ .sass('resources/sass/app.scss', 'public/css');