PHP code example of michaeldojcar / laravel-photo

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

    

michaeldojcar / laravel-photo example snippets


use MichaelDojcar\LaravelPhoto\Models\Photo;

$photo = Photo::findOrFail(1);
$photo->url();

use MichaelDojcar\LaravelPhoto\Models\Photo;

$photo = Photo::findOrFail(1);
$photo->resize(250, 120); // Specify width and height

php artisan vendor:publish --provider=MichaelDojcar\LaravelPhoto\Providers\PhotoServiceProvider