Asked  7 Months ago    Answers:  5   Viewed   88 times

I'm using PHP Storm v8.0.3 with the latest version of Laravel.

I'm having trouble making the autocomplete work.

enter image description here

As you can see in the image above.

I have installed barryvdh ide-helper, following the readme he provides on git. I haven't received any errors during its installation.

enter image description here

I have included it in the providers array as either




It didn't make any difference(as far as I can tell).

I have also installed the Laravel plugin.

Again, no difference, still no auto-complete.

enter image description here

I tried dumping the config file which resulted in:

array:27 [?
  22 => "IlluminateViewViewServiceProvider"
  23 => "BarryvdhLaravelIdeHelperIdeHelperServiceProvider"
  24 => "AppProvidersAppServiceProvider"

I'm really stuck on this one. I have no idea what could be wrong. Any nudging in the right direction is greatly appreciated.



Two possible fixes for that:

  1. Make your models extend the Eloquent facade instead of IlluminateDatabaseEloquentModel.
  2. If you prefer to keep using the "Model" facade, you can make your own alias in config/app.php, then change "eloquent" to "model" in the config/ide-helper.php under extra. This will let ide-helper include all the methods from IlluminateDatabaseEloquentBuilder and IlluminateDatabaseQueryBuilder which is where the missing methods actually live.


Saturday, May 29, 2021
answered 7 Months ago

Ok here is the solution, assuming you have installed the helper already:


Replace in a controller:

use IlluminateSupportFacadesValidator;


  use Validator

In your config/app.php you must have this alias:

'Validator' => IlluminateSupportFacadesValidator::class,

In my case it was already there.

After this, no more error message for the example shown in the image above and I can use full power of phpstorm that correctly understands the ::make method.

Source thanks @lazyone.

Saturday, May 29, 2021
answered 7 Months ago

You are not passing the current page, like you should so you also get same array. This will work

public function paginate($items,$perPage)
    $pageStart = Request::get('page', 1);
    // Start displaying items from this number;
    $offSet = ($pageStart * $perPage) - $perPage; 

    // Get only the items you need using array_slice
    $itemsForCurrentPage = array_slice($items, $offSet, $perPage, true);

    return new LengthAwarePaginator($itemsForCurrentPage, count($items), $perPage,Paginator::resolveCurrentPage(), array('path' => Paginator::resolveCurrentPath()));

Your function will also work if you pass correct value for $pageStart - Request::get('page', 1)

Wednesday, August 4, 2021
answered 4 Months ago

I ran "php artisan ide-helper:models" -> Yes, it wrote some line in my models file and still not work I ran again "php artisan ide-helper:models" -> No, it created a new file called _ide_helper_models.php file but still not work.


I access file _ide_helper_models.php and add this function into class Article it work xD

 * Add an "order by" clause for a timestamp to the query.
 * @param string $column
 * @return IlluminateDatabaseQueryBuilder|static 
 * @static 
public static function latest($column = 'created_at'){
    return IlluminateDatabaseQueryBuilder::latest($column);
Tuesday, August 24, 2021
answered 4 Months ago

This issue is now resolved as per these github issues:



The proper solution now is to do composer update

Sunday, August 29, 2021
answered 3 Months ago
Only authorized users can answer the question. Please sign in first, or register a free account.
Not the answer you're looking for? Browse other questions tagged :