PHP code example of royvoetman / laravel-gitlab-storage
1. Go to this page and download the library: Download royvoetman/laravel-gitlab-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/ */
royvoetman / laravel-gitlab-storage example snippets
'gitlab' => [
'driver' => 'gitlab',
'personal-access-token' => env('GITLAB_ACCESS_TOKEN', ''), // Personal access token
'project-id' => env('GITLAB_PROJECT_ID'), // Project id of your repo
'branch' => env('GITLAB_BRANCH', 'master'), // Branch that should be used
'base-url' => env('GITLAB_BASE_URL', 'https://gitlab.com'), // Base URL of Gitlab server you want to use
],
$disk = Storage::disk('gitlab');
// 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.