1. Go to this page and download the library: Download cerbero/eloquent-inspector library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
cerbero / eloquent-inspector example snippets
use App\Models\User;
use Cerbero\EloquentInspector\Inspector;
$inspector = Inspector::inspect(User::class);
// flush information of all inspected models
Inspector::flush();
// flush information of an inspected model
Inspector::flush(User::class);
// forget information of the current inspection
Inspector::inspect(User::class)->forget();
use Illuminate\Database\Eloquent\Model;
use Foo\Bar as Baz;
class User extends Model
{
// ...
}
$useStatements = Inspector::inspect(User::class)->getUseStatements();
/*
[
'Model' => 'Illuminate\Database\Eloquent\Model',
'Baz' => 'Foo\Bar',
]
*/