PHP code example of artisanpack-ui / secure-uploads
1. Go to this page and download the library: Download artisanpack-ui/secure-uploads 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/ */
artisanpack-ui / secure-uploads example snippets
use ArtisanPackUI\SecureUploads\Concerns\HasSecureFiles;
class Post extends Model
{
use HasSecureFiles;
}
$post = Post::find(1);
$stored = $post->attachSecureFile($request->file('attachment'));
return redirect()->route('secure-file.show', ['identifier' => $stored->identifier]);
bash
php artisan vendor:publish --tag=secure-uploads-config
bash
php artisan vendor:publish --tag=secure-uploads-config