PHP code example of cesargb / laravel-model-toolkit

1. Go to this page and download the library: Download cesargb/laravel-model-toolkit 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/ */

    

cesargb / laravel-model-toolkit example snippets

 bash
php artisan model:clean
 bash
php artisan model:list
 php
use Cesargb\ModelToolkit\Morph;

$morph = new Morph();
$models = $morph->get();
 php
$deleted = $morph->clean(\App\Models\Post::class, 'comments');
 php
use Cesargb\ModelToolkit\Prunable;

$prunable = new Prunable();
$models = $prunable->get();