I'm working on a project using Laravel 5.5 and I'm using PhpStorm as IDE but it shows me
"Method 'table' not found in \Illuminate\Support\Facades\DB..."
"Referenced method is not found in subject class.. "
The code however is working perfectly but still want to know the perfect syntax.
even if you install the barryvdh/laravel-ide-helper the problem persist, there's a quick solution for this problem, if you look in the /vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php class and Add this PhpDoc
/**
* @mixin \Eloquent
* @mixin \Illuminate\Database\Eloquent\Builder
*/
PhpStorm will now recognize all the Query building methods for all your models
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With