Recommend this page to a friend! |
Download |
Info | Documentation | Files | Install with Composer | Download | Reputation | Support forum | Blog | Links |
Ratings | Unique User Downloads | Download Rankings | ||||
Not yet rated by the users | Total: 105 | All time: 9,721 This week: 455 |
Version | License | PHP version | Categories | |||
laravel-uploader 1.0.0 | Custom (specified... | 5 | HTTP, PHP 5, Files and Folders |
Install the latest version using Composer:
$ composer require raggitech/laravel-uploader
then publish the migration & config files
$ php artisan vendor:publish --tag=laravel-uploader
$ php artisan migrate
<a name="config"></a>
/
* prefix => Hash Prefix
* visitable => Visits Counter
* private => Only Permitted Users
*/
<a name="UG"></a>
// Upload File
$file = upload($request->image, [
'visitable' => true
]);
// Getting Uploaded File with Hash code
$file = getUploaded('5e63885fa771d1.12185481920ncF3...');
// Information
echo $file->hash; // File's Hash
echo $file->name; // File's Name
echo $file->path; // File's Path
echo $file->size; // File's Size in Bytes
echo $file->readableSize(); // File's Readable Size
echo $file->extension; // File's Extension
echo $file->mime; // File's MIME
echo $file->visits; // File's visits (Visitable File)
<a name="URL_UP"></a>
echo $file->url(); // Getting Uploaded File's URL
// <img src"{{ $file->url() }}" alt="{{ $file->name }}">
$user = $file->uploader; // Getting Uploader's Model
<a name="dd"></a>
$file->delete();
<a name="permits"></a>
$permits = $file->permits; // Getting Permits List
$permitted = $file->isPermitted($user); // Checking if permitted (App\User)
$file->permit($user, '2021-02-01'); // Permitting a user
$file->forbid($user); // Forbidding a user
Files (13) |
File | Role | Description | ||
---|---|---|---|---|
src (6 files, 3 directories) | ||||
composer.json | Data | Auxiliary data | ||
LICENSE | Lic. | License text | ||
README.md | Doc. | Documentation |
Files (13) | / | src |
File | Role | Description | ||
---|---|---|---|---|
config (1 file) | ||||
Controller (1 file) | ||||
database (1 directory) | ||||
File.php | Class | Class source | ||
Helpers.php | Example | Example script | ||
routes.php | Class | Class source | ||
Upload.php | Class | Class source | ||
UploaderServiceProvider.php | Class | Class source | ||
UploadPermit.php | Class | Class source |
Files (13) | / | src | / | database | / | migrations |
File | Role | Description |
---|---|---|
uploads.stub | Class | Class source |
upload_permits.stub | Class | Class source |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.