diff --git a/.env.example b/.env.example
index 138332c6..21e860aa 100644
--- a/.env.example
+++ b/.env.example
@@ -1,10 +1,8 @@
+APP_NAME=Laravel
APP_ENV=production
APP_KEY=SomeRandomString # Leave this
APP_DEBUG=false
APP_LOG_LEVEL=warning
-APP_TIMEZONE=UTC
-APP_LANG=en
-APP_LOG=daily
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
@@ -13,6 +11,7 @@ DB_DATABASE=
DB_USERNAME=
DB_PASSWORD=
+BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
@@ -27,8 +26,10 @@ MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
-MAILGUN_DOMAIN=null
-MAILGUN_SECRET=null
+
+PUSHER_APP_ID=
+PUSHER_APP_KEY=
+PUSHER_APP_SECRET=
AWS_S3_KEY=your-key
AWS_S3_SECRET=your-secret
@@ -54,3 +55,8 @@ SCOUT_DRIVER=pgsql
PIWIK=false
PIWIK_ID=1
PIWIK_URL=https://analytics.jmb.lv/piwik.php
+
+APP_TIMEZONE=UTC
+APP_LANG=en
+APP_LOG=daily
+SECURE_SESSION_COOKIE=true
diff --git a/.gitattributes b/.gitattributes
index 2195b20d..967315dd 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -2,3 +2,4 @@
*.css linguist-vendored
*.scss linguist-vendored
*.js linguist-vendored
+CHANGELOG.md export-ignore
diff --git a/.gitignore b/.gitignore
index c8cae252..b4bc6662 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,11 +1,14 @@
/node_modules
-/public/storage
/public/hot
+/public/storage
/storage/*.key
/vendor
/.idea
+/.vagrant
Homestead.yaml
Homestead.json
+.npm-debug.log
+yarn-error.log
.env
/public/files
/public/keybase.txt
diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php
index 2abd9e04..b2ea669a 100644
--- a/app/Http/Controllers/Auth/LoginController.php
+++ b/app/Http/Controllers/Auth/LoginController.php
@@ -21,7 +21,7 @@ class LoginController extends Controller
use AuthenticatesUsers;
/**
- * Where to redirect users after login / registration.
+ * Where to redirect users after login.
*
* @var string
*/
@@ -34,6 +34,6 @@ class LoginController extends Controller
*/
public function __construct()
{
- $this->middleware('guest', ['except' => 'logout']);
+ $this->middleware('guest')->except('logout');
}
}
diff --git a/app/Http/Controllers/Auth/RegisterController.php b/app/Http/Controllers/Auth/RegisterController.php
index e48e2e3b..ed8d1b77 100644
--- a/app/Http/Controllers/Auth/RegisterController.php
+++ b/app/Http/Controllers/Auth/RegisterController.php
@@ -23,7 +23,7 @@ class RegisterController extends Controller
use RegistersUsers;
/**
- * Where to redirect users after login / registration.
+ * Where to redirect users after registration.
*
* @var string
*/
@@ -48,9 +48,9 @@ class RegisterController extends Controller
protected function validator(array $data)
{
return Validator::make($data, [
- 'name' => 'required|max:255',
- 'email' => 'required|email|max:255|unique:users',
- 'password' => 'required|min:6|confirmed',
+ 'name' => 'required|string|max:255',
+ 'email' => 'required|string|email|max:255|unique:users',
+ 'password' => 'required|string|min:6|confirmed',
]);
}
diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php
index 1fad4108..c8b1e55b 100644
--- a/app/Http/Kernel.php
+++ b/app/Http/Kernel.php
@@ -30,6 +30,7 @@ class Kernel extends HttpKernel
\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,
@@ -57,8 +58,8 @@ class Kernel extends HttpKernel
'bindings' => \Illuminate\Routing\Middleware\SubstituteBindings::class,
'can' => \Illuminate\Auth\Middleware\Authorize::class,
'guest' => \App\Http\Middleware\RedirectIfAuthenticated::class,
- 'myauth' => \App\Http\Middleware\MyAuthMiddleware::class,
'throttle' => \Illuminate\Routing\Middleware\ThrottleRequests::class,
'micropub.token' => \App\Http\Middleware\VerifyMicropubToken::class,
+ 'myauth' => \App\Http\Middleware\MyAuthMiddleware::class,
];
}
diff --git a/app/Http/Middleware/RedirectIfAuthenticated.php b/app/Http/Middleware/RedirectIfAuthenticated.php
index e27860e2..e4cec9c8 100644
--- a/app/Http/Middleware/RedirectIfAuthenticated.php
+++ b/app/Http/Middleware/RedirectIfAuthenticated.php
@@ -18,7 +18,7 @@ class RedirectIfAuthenticated
public function handle($request, Closure $next, $guard = null)
{
if (Auth::guard($guard)->check()) {
- return redirect('/');
+ return redirect('/home');
}
return $next($request);
diff --git a/app/Providers/AuthServiceProvider.php b/app/Providers/AuthServiceProvider.php
index f3e3c3fc..db3c26f9 100644
--- a/app/Providers/AuthServiceProvider.php
+++ b/app/Providers/AuthServiceProvider.php
@@ -2,6 +2,7 @@
namespace App\Providers;
+use Illuminate\Support\Facades\Gate;
use Illuminate\Foundation\Support\Providers\AuthServiceProvider as ServiceProvider;
class AuthServiceProvider extends ServiceProvider
diff --git a/app/Providers/EventServiceProvider.php b/app/Providers/EventServiceProvider.php
index 9b28f3e3..fca6152c 100644
--- a/app/Providers/EventServiceProvider.php
+++ b/app/Providers/EventServiceProvider.php
@@ -19,7 +19,7 @@ class EventServiceProvider extends ServiceProvider
];
/**
- * Register any other events for your application.
+ * Register any events for your application.
*
* @return void
*/
diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php
index 1b9577e3..5ea48d39 100644
--- a/app/Providers/RouteServiceProvider.php
+++ b/app/Providers/RouteServiceProvider.php
@@ -19,7 +19,6 @@ class RouteServiceProvider extends ServiceProvider
/**
* Define your route model bindings, pattern filters, etc.
*
- * @param \Illuminate\Routing\Router $router
* @return void
*/
public function boot()
diff --git a/artisan b/artisan
index df630d0d..44dc07b0 100755
--- a/artisan
+++ b/artisan
@@ -40,7 +40,7 @@ $status = $kernel->handle(
| Shutdown The Application
|--------------------------------------------------------------------------
|
-| Once Artisan has finished running. We will fire off the shutdown events
+| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
diff --git a/bootstrap/autoload.php b/bootstrap/autoload.php
index 94adc997..c64e19fa 100644
--- a/bootstrap/autoload.php
+++ b/bootstrap/autoload.php
@@ -9,8 +9,8 @@ define('LARAVEL_START', microtime(true));
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
-| into the script here so that we do not have to worry about the
-| loading of any our classes "manually". Feels great to relax.
+| into the script here so we do not have to manually load any of
+| our application's PHP classes. It just feels great to relax.
|
*/
diff --git a/config/auth.php b/config/auth.php
index 97b29789..78175010 100644
--- a/config/auth.php
+++ b/config/auth.php
@@ -90,6 +90,7 @@ return [
| they have less time to be guessed. You may change this as needed.
|
*/
+
'passwords' => [
'users' => [
'provider' => 'users',
diff --git a/config/database.php b/config/database.php
index cd74d4d7..9b9632e8 100644
--- a/config/database.php
+++ b/config/database.php
@@ -67,6 +67,17 @@ return [
'sslmode' => 'prefer',
],
+ 'sqlsrv' => [
+ 'driver' => 'sqlsrv',
+ 'host' => env('DB_HOST', 'localhost'),
+ 'port' => env('DB_PORT', '1433'),
+ 'database' => env('DB_DATABASE', 'forge'),
+ 'username' => env('DB_USERNAME', 'forge'),
+ 'password' => env('DB_PASSWORD', ''),
+ 'charset' => 'utf8',
+ 'prefix' => '',
+ ],
+
'travis' => [
'driver' => 'pgsql',
'host' => 'localhost',
@@ -106,7 +117,7 @@ return [
'redis' => [
- 'cluster' => false,
+ 'client' => 'predis',
'default' => [
'host' => env('REDIS_HOST', 'localhost'),
diff --git a/config/filesystems.php b/config/filesystems.php
index 38b34b97..6721ad67 100644
--- a/config/filesystems.php
+++ b/config/filesystems.php
@@ -13,7 +13,7 @@ return [
|
*/
- 'default' => 'local',
+ 'default' => env('FILESYSTEM_DRIVER', 'local'),
/*
|--------------------------------------------------------------------------
@@ -26,7 +26,7 @@ return [
|
*/
- 'cloud' => 's3',
+ 'cloud' => env('FILESYSTEM_CLOUD', 's3'),
/*
|--------------------------------------------------------------------------
diff --git a/config/mail.php b/config/mail.php
index 2884c67a..95ebf4ee 100644
--- a/config/mail.php
+++ b/config/mail.php
@@ -113,6 +113,7 @@ return [
'markdown' => [
'theme' => 'default',
+
'paths' => [
resource_path('views/vendor/mail'),
],
diff --git a/config/services.php b/config/services.php
index 287b1186..4460f0ec 100644
--- a/config/services.php
+++ b/config/services.php
@@ -8,7 +8,7 @@ return [
|--------------------------------------------------------------------------
|
| This file is for storing the credentials for third party services such
- | as Stripe, Mailgun, Mandrill, and others. This file provides a sane
+ | 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.
|
diff --git a/config/session.php b/config/session.php
index 2ea2eed5..659fb767 100644
--- a/config/session.php
+++ b/config/session.php
@@ -161,7 +161,7 @@ return [
|
*/
- 'secure' => (config('app.env') != 'testing'),
+ 'secure' => env('SESSION_SECURE_COOKIE', false),
/*
|--------------------------------------------------------------------------
diff --git a/database/factories/ModelFactory.php b/database/factories/ModelFactory.php
index b4663e4d..8ad6c471 100644
--- a/database/factories/ModelFactory.php
+++ b/database/factories/ModelFactory.php
@@ -13,10 +13,12 @@
/** @var \Illuminate\Database\Eloquent\Factory $factory */
$factory->define(App\User::class, function (Faker\Generator $faker) {
+ static $password;
+
return [
'name' => $faker->name,
'email' => $faker->safeEmail,
- 'password' => bcrypt(str_random(10)),
+ 'password' => $password ?: $password = bcrypt('secret'),
'remember_token' => str_random(10),
];
});
diff --git a/phpunit.xml b/phpunit.xml
index 88860829..da3bb8c8 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -9,10 +9,10 @@
processIsolation="false"
stopOnFailure="false">