first upload all files
This commit is contained in:
25
app/Http/Middleware/RunUpdater.php
Normal file
25
app/Http/Middleware/RunUpdater.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace FleetCart\Http\Middleware;
|
||||
|
||||
use Closure;
|
||||
use FleetCart\Updater;
|
||||
|
||||
class RunUpdater
|
||||
{
|
||||
/**
|
||||
* Handle an incoming request.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
* @return mixed
|
||||
*/
|
||||
public function handle($request, Closure $next)
|
||||
{
|
||||
if (config('app.installed') && file_exists(storage_path('app/update'))) {
|
||||
Updater::run();
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user