Issue
The Laravel package comes with an aliases
array in config/app.php
Essentially, it allows to import shorter namespaces at the start of your document.
For example, I can import the Illuminate\Support\Facades\DB::class
class just by DB
:
<?php
namespace App\Services\Whatever;
use DB;
However, this generates a warning in my PhpStorm editor
Warning:(4,5) Undefined class 'DB'
Is there a way to make PhpStorm aware of the aliases? Or am I forced to not use the Laravel aliases in order to resolve those IDE warnings?
Solution
Try to copy this file to the root folder of your laravel project:
https://gist.github.com/barryvdh/5227822
Answered By - galloleonardo Answer Checked By - Katrina (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.