https://github.com/atomicptr/laravel-github-storage
A GitHub based filesystem for Laravel
https://github.com/atomicptr/laravel-github-storage
laravel laravel-package
Last synced: 11 months ago
JSON representation
A GitHub based filesystem for Laravel
- Host: GitHub
- URL: https://github.com/atomicptr/laravel-github-storage
- Owner: atomicptr
- License: mit
- Created: 2024-03-18T21:50:17.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-03-18T22:14:54.000Z (almost 2 years ago)
- Last Synced: 2025-03-07T00:37:44.193Z (11 months ago)
- Topics: laravel, laravel-package
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# laravel-github-storage
A GitHub based filesystem for Laravel, powered by [php-github-api](https://github.com/KnpLabs/php-github-api).
**Note**: Keep in mind that GitHub has a rate limit, so if you need a lot of file operations you might
need something else.
## Installation
```bash
composer require atomicptr/laravel-github-storage
```
Add a new disk to your filesystems.php configuration file
```php
'github' => [
'driver' => 'github',
'token' => env('GITHUB_STORAGE_TOKEN', ''),
'username' => env('GITHUB_STORAGE_USERNAME', ''),
'repository' => env('GITHUB_STORAGE_REPOSITORY', ''),
'branch' => env('GITHUB_STORAGE_BRANCH', 'master'),
'prefix' => env("GITHUB_STORAGE_PREFIX", ''),
],
```
also add the service provider to your bootstrap/providers.php file
```php
exists('assets/image.jpg')) {
$storage->put('assets/', $imageFileContent);
}
// See https://laravel.com/docs/filesystem
````
## License
MIT