Add check to see that we're installed, and remove the .env that's created
This commit is contained in:
24
app/Http/Middleware/InstalledCheck.php
Normal file
24
app/Http/Middleware/InstalledCheck.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
/**
|
||||
* Handle the authentication for the API layer
|
||||
*/
|
||||
|
||||
namespace App\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
|
||||
class InstalledCheck
|
||||
{
|
||||
/**
|
||||
* Check the app.key to see whether we're installed or not
|
||||
*
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if (config('app.key') === 'NOT_INSTALLED') {
|
||||
return view('system.errors.not_installed');
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user