1. Go to this page and download the library: Download devfactory/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/ */
// Retrieves every Media linked with the user
$all_media = $user->getMedia();
// Retrieve a specific Media
$profile_picture = $user->getMedia('profile_picture');
// Delete all media for a user
$user->deleteMedia();
// Delete specific media
$user->deleteMedia('profile_picture');
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.