PHP code example of infernalmedia / laravel-gitea-storage
1. Go to this page and download the library: Download infernalmedia/laravel-gitea-storage 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/ */
infernalmedia / laravel-gitea-storage example snippets
'gitea' => [
'driver' => 'gitea',
'personal-access-token' => env('GITEA_ACCESS_TOKEN', ''), // Personal access token
'username' => env('GITEA_USERNAME'),
'repository' => env('GITEA_REPOSITORY'), // your repo
'branch' => env('GITEA_BRANCH', 'main'), // Branch that should be used
'base-url' => env('GITEA_BASE_URL', 'https://gitea.com'), // Base URL of Gitea server you want to use
],
$disk = Storage::disk('gitea');
// create a file
$disk->put('images/', $fileContents);
// check if a file exists
$exists = $disk->exists('file.jpg');
// copy a file
$disk->copy('old/file1.jpg', 'new/file1.jpg');
// move a file
$disk->move('old/file1.jpg', 'new/file1.jpg');
// See https://laravel.com/docs/filesystem for a full list of all the available functionality
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.