Level 24
@rjsargeant backup your project first, then try to install https://github.com/barryvdh/laravel-ide-helper
composer require --dev barryvdh/laravel-ide-helper
php artisan ide-helper:generate
// -N means don't overwrite your exists model
// without -N , the command will ask you overwrite the exists model, just answer 'no'
php artisan ide-helper:models -N
edit composer.json, ONLY change the code inside "post-update-cmd" , the first line is end of ,
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force",
"@php artisan ide-helper:generate",
"@php artisan ide-helper:models -N"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
},
edit your-project\.gitignore , at the end add
_ide_helper.php
_ide_helper_models.php