refactored report and update abstracts
This commit is contained in:
@ -1,31 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace App\Listeners\Update;
|
||||
|
||||
class Listener
|
||||
{
|
||||
const ALIAS = '';
|
||||
|
||||
const VERSION = '';
|
||||
|
||||
/**
|
||||
* Check if should listen.
|
||||
*
|
||||
* @param $event
|
||||
* @return boolean
|
||||
*/
|
||||
protected function check($event)
|
||||
{
|
||||
// Apply only to the specified alias
|
||||
if ($event->alias != static::ALIAS) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Do not apply to the same or newer versions
|
||||
if (version_compare($event->old, static::VERSION, '>=')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V10;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use File;
|
||||
|
||||
class Version106 extends Listener
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V10;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use DB;
|
||||
|
||||
class Version107 extends Listener
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V10;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Common\Company;
|
||||
use App\Models\Expense\Bill;
|
||||
use App\Models\Expense\BillStatus;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V10;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Common\Company;
|
||||
use Artisan;
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V11;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Auth\Role;
|
||||
use App\Models\Auth\Permission;
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V11;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Common\Company;
|
||||
use App\Utilities\Installer;
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V11;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Setting\Currency;
|
||||
use Artisan;
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V11;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Auth\Role;
|
||||
use App\Models\Auth\Permission;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V12;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Auth\Role;
|
||||
use App\Models\Auth\Permission;
|
||||
use App\Models\Common\Company;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V12;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use Artisan;
|
||||
|
||||
class Version1210 extends Listener
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V12;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use Artisan;
|
||||
|
||||
class Version1211 extends Listener
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V12;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Auth\Role;
|
||||
use App\Models\Auth\Permission;
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V12;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Auth\Permission;
|
||||
use File;
|
||||
use Illuminate\Support\Str;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V12;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use Artisan;
|
||||
|
||||
class Version129 extends Listener
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V13;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Auth\Role;
|
||||
use App\Models\Auth\Permission;
|
||||
use Artisan;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V13;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Auth\Role;
|
||||
use App\Models\Auth\Permission;
|
||||
use Artisan;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V13;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Common\Company;
|
||||
use App\Utilities\Installer;
|
||||
use Artisan;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V13;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Common\Company;
|
||||
use App\Utilities\Overrider;
|
||||
use App\Models\Banking\Account;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V13;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Auth\Role;
|
||||
use App\Models\Auth\Permission;
|
||||
use Artisan;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V13;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use Date;
|
||||
|
||||
class Version135 extends Listener
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V13;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use Date;
|
||||
|
||||
class Version138 extends Listener
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V13;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Income\InvoiceItem;
|
||||
use App\Models\Income\InvoiceItemTax;
|
||||
use App\Models\Setting\Tax;
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V20;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use App\Models\Auth\User;
|
||||
use App\Models\Auth\Role;
|
||||
use App\Models\Auth\Permission;
|
||||
@ -32,8 +32,7 @@ class Version200 extends Listener
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
// Check if should listen
|
||||
if (!$this->check($event)) {
|
||||
if ($this->skipThisUpdate($event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -2,8 +2,8 @@
|
||||
|
||||
namespace App\Listeners\Update\V13;
|
||||
|
||||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Listeners\Update\Listener;
|
||||
use Artisan;
|
||||
|
||||
class Version201 extends Listener
|
||||
@ -20,8 +20,7 @@ class Version201 extends Listener
|
||||
*/
|
||||
public function handle(Event $event)
|
||||
{
|
||||
// Check if should listen
|
||||
if (!$this->check($event)) {
|
||||
if ($this->skipThisUpdate($event)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user