PHP code example of elysiumrealms / imageable

1. Go to this page and download the library: Download elysiumrealms/imageable 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/ */

    

elysiumrealms / imageable example snippets


use Elysiumrealms\Imageable;

class User extends Model
implements Imageable\Contracts\Imageable
{
    use Imageable\Traits\ImageableTrait;

    ...
}

function schedule(Schedule $schedule)
{
    $schedule->command('imageable:prune')
        ->onOneServer()
        ->daily();
}

    User::find(1)->images;
    
bash
php artisan migrate
bash
    curl -X DELETE http://localhost:8000/api/v1/imageable/ \
        -H "Authorization: Bearer {token}"
        -H "Content-Type: application/json"
        -d '{"images": ["xxx_01.jpg", "xxx_02.jpg", "xxx_03.jpg"]}'