PHP code example of ar7 / media
1. Go to this page and download the library: Download ar7/media 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/ */
ar7 / media example snippets
$medium->getSubSize('thumbnail');
use Ar7\Media\Ar7Media;
class Product extends Model
{
...
use Ar7Media;
...
}
use Ar7\Media\Facades\Ar7Media;
class HomeController
{
function index()
{
$file = $request->file('file');
Ar7Media::upload($file, 'path'); // path is optional
}
}