DEV Community

mark vachi
mark vachi

Posted on • Updated on

ติดตั้ง IDE Helper ใน Lumen

จาก Laravel IDE Helper Generator

ติดตั้ง laravel-ide-helper

composer require --dev barryvdh/laravel-ide-helper
Enter fullscreen mode Exit fullscreen mode

Setting

register ide-helper ที่ bootstrap/app.php

...
// check local environment
if (app()->environment('local')) {
    // register ide-helper
    $app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class);
}
...
Enter fullscreen mode Exit fullscreen mode

เพิ่มลง composer.json

...
"scripts": {
        "post-update-cmd": [
            "Illuminate\\Foundation\\ComposerScripts::postUpdate",
            "@php artisan ide-helper:generate",
            "@php artisan ide-helper:meta"
        ],
       ....
    },
...
Enter fullscreen mode Exit fullscreen mode

ทดสอบ

composer update
Enter fullscreen mode Exit fullscreen mode

Top comments (0)