thotam/thotam-file-library

File Library Manager Package

0.0.1 2021-04-26 07:38 UTC

This package is auto-updated.

Last update: 2024-10-21 13:08:59 UTC


README

Latest Version on Packagist Build Status Quality Score Total Downloads

This is where your description should go. Try and limit it to a paragraph or two, and maybe throw in a mention of what PSRs you support to avoid any confusion with users and contributors.

Installation

You can install the package via composer:

composer require thotam/thotam-file-library

Usage

Add this to config/filesystems.php

        'google' => [
            'driver' => 'google',
            'clientId' => env('MAIN_GOOGLE_DRIVE_CLIENT_ID'),
            'clientSecret' => env('MAIN_GOOGLE_DRIVE_CLIENT_SECRET'),
            'refreshToken' => env('MAIN_GOOGLE_DRIVE_REFRESH_TOKEN'),
            'folderId' => env('MAIN_GOOGLE_DRIVE_FOLDER_ID'),
        ],

Add this to .env

MAIN_GOOGLE_DRIVE_CLIENT_ID=""
MAIN_GOOGLE_DRIVE_CLIENT_SECRET=""
MAIN_GOOGLE_DRIVE_REFRESH_TOKEN=""
MAIN_GOOGLE_DRIVE_FOLDER_ID=""

MAIN_GOOGLE_API_KEY=""

VIMEO_CLIENT=
VIMEO_SECRET=
VIMEO_ACCESS=

VIMEO_ALT_CLIENT=
VIMEO_ALT_SECRET=
VIMEO_ALT_ACCESS=

Add ThotamGoogleDriveServiceProvider

add Thotam\ThotamFileLibrary\Providers\ThotamGoogleDriveServiceProvider::class to 'providers' in config/app.php

Add FileLibraryTraits to you Model you want to you

use Thotam\ThotamFileLibrary\Traits\FileLibraryTraits;

Add ThotamFileUploadTraits to you Livewire class you want to handle your file

use Thotam\ThotamFileLibrary\Traits\ThotamFileUploadTraits;

add schedule to App\Console\Kernel;

$schedule->command('thotam-file-library:clean-public-disk')->everyTenMinutes();

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email thanhtamtqno1@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.