title: Laravel 5.5 - From within an API Resource class, how do I get the underlying model class name?
body: <p>I have a Laravel 5.5 app with an <a href="https://laravel.com/docs/5.5/eloquent-resources" rel="nofollow noreferrer">API resource class</a>. How do I get the underlying model class name from within the <code>toArray()</code> method? I'm aware that you can access the properties and methods of the underlying model using <code>$this-&gt;</code> because the class will automatically proxy it to the underlying model. But how do I actually retrieve either the underlying model itself, or more importantly, the model class name? Is there a way?</p>