Last active
June 1, 2022 18:40
-
-
Save richardDobron/1982145875e1078e004b3b35adcbf9fc to your computer and use it in GitHub Desktop.
Automatic schema generation for ide-helper after finished migrations in Laravel.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Database\Events\MigrationsEnded; | |
use Illuminate\Foundation\Support\Providers\EventServiceProvider as ServiceProvider; | |
use Illuminate\Support\Facades\Artisan; | |
use Illuminate\Support\Facades\Event; | |
class EventServiceProvider extends ServiceProvider | |
{ | |
public function boot() | |
{ | |
Event::listen( | |
MigrationsEnded::class, | |
function () { | |
Artisan::call('ide-helper:models -r -W'); | |
} | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment