Type hinting for the model objects of Eloquent ORM
<p>I haven't used laravel yet, but watching the tutorials on youtube left me with a question to type hinting, that is really important to me.</p>

<p>Now I have read here</p>

<p><a href="https://stackoverflow.com/questions/30405924/type-hinting-eloquent-models">Type Hinting Eloquent Models</a></p>

<p>and here</p>

<p><a href="https://stackoverflow.com/questions/29439753/eloquent-orm-code-hinting-in-phpstorm">Eloquent ORM Code Hinting in PhpStorm</a></p>

<p>but neither addresses the following problem:</p>

<pre><code>namespace App;
use Illuminate\Database\Eloquent\Model;

    class Movie extends Model {
}
</code></pre>

<p>now lets say movie has a name, id, length, author</p>

<p>all those fields are not defined in the class movie, but somehow come automagically from the active record ORM eloquent model <a href="https://www.youtube.com/watch?v=U3PsPHqYRfQ" rel="nofollow noreferrer">if I understood correctly</a></p>

<p>But let's be honest, I wont remember if it was called <code>author</code>, <code>Author</code> or <code>AuthorName</code>. Or <code>MovieLength</code>, <code>Length</code> or <code>TotalTime</code></p>

<p>how should i remember all of that for ALL models? is there a way to type hint this in php storm?</p>

<p>i mean the fields from all tables in all models.</p>

<p><strong>EDIT</strong></p>

<p>to make it more clear</p>

<p>i want to type:</p>

<pre><code>$m = App\Movie::find(1);
$m-&gt;|
</code></pre>

<p>where <code>|</code> is my caret. Now what fields do I have on the class Movie?</p>