mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
Initial commit
This commit is contained in:
75
routes/api.php
Normal file
75
routes/api.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register API routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| is assigned the "api" middleware group. Enjoy building your API!
|
||||
|
|
||||
*/
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Public API Routes for no needed user accounts
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
Route::group(['middleware' => ['api']], function () {
|
||||
|
||||
});
|
||||
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Public API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
Route::group(['middleware' => ['api']], function () {
|
||||
|
||||
// User authentification
|
||||
Route::post('/user/check', 'PrivateCloud\AuthController@check_account');
|
||||
Route::post('/user/register', 'PrivateCloud\AuthController@register');
|
||||
Route::post('/user/login', 'PrivateCloud\AuthController@login');
|
||||
|
||||
// User reset password
|
||||
Route::post('/password/email', 'PrivateCloud\ForgotPasswordController@sendResetLinkEmail');
|
||||
Route::post('/password/reset', 'PrivateCloud\ResetPasswordController@reset');
|
||||
});
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Private API Routes
|
||||
|--------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
Route::group(['middleware' => ['throttle:500,1', 'auth:api', 'auth.cookie']], function () {
|
||||
Route::get('/file/{name}', 'FileManagerController@get_file')->name('file');
|
||||
});
|
||||
|
||||
Route::group(['middleware' => ['auth:api', 'auth.cookie']], function () {
|
||||
|
||||
// User account
|
||||
Route::post('/user/password', 'PrivateCloud\UserAccountController@change_password');
|
||||
Route::put('/user/profile', 'PrivateCloud\UserAccountController@update_profile');
|
||||
Route::get('/user', 'PrivateCloud\UserAccountController@user');
|
||||
Route::get('/logout', 'PrivateCloud\AuthController@logout');
|
||||
|
||||
// File manager routes
|
||||
Route::get('/folder/{unique_id}', 'PrivateCloud\FileManagerController@folder')->where('unique_id', '[0-9]+');
|
||||
Route::post('/remove-from-favourites', 'PrivateCloud\UserAccountController@remove_from_favourites');
|
||||
Route::get('/file-detail/{unique_id}', 'PrivateCloud\FileManagerController@get_file_detail');
|
||||
Route::post('/add-to-favourites', 'PrivateCloud\UserAccountController@add_to_favourites');
|
||||
Route::post('/create-folder', 'PrivateCloud\FileManagerController@create_folder');
|
||||
Route::delete('/empty-trash', 'PrivateCloud\FileManagerController@empty_trash');
|
||||
Route::post('/restore-item', 'PrivateCloud\FileManagerController@restore_item');
|
||||
Route::post('/rename-item', 'PrivateCloud\FileManagerController@rename_item');
|
||||
Route::post('/remove-item', 'PrivateCloud\FileManagerController@delete_item');
|
||||
Route::post('/upload-file', 'PrivateCloud\FileManagerController@upload_item');
|
||||
Route::post('/move-item', 'PrivateCloud\FileManagerController@move_item');
|
||||
Route::get('/search', 'PrivateCloud\FileManagerController@search');
|
||||
Route::get('/trash', 'PrivateCloud\FileManagerController@trash');
|
||||
});
|
||||
16
routes/channels.php
Normal file
16
routes/channels.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Broadcast Channels
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here you may register all of the event broadcasting channels that your
|
||||
| application supports. The given channel authorization callbacks are
|
||||
| used to check if an authenticated user can listen to the channel.
|
||||
|
|
||||
*/
|
||||
|
||||
Broadcast::channel('App.User.{id}', function ($user, $id) {
|
||||
return (int) $user->id === (int) $id;
|
||||
});
|
||||
18
routes/console.php
Normal file
18
routes/console.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Foundation\Inspiring;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Console Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This file is where you may define all of your Closure based console
|
||||
| commands. Each Closure is bound to a command instance allowing a
|
||||
| simple approach to interacting with each command's IO methods.
|
||||
|
|
||||
*/
|
||||
|
||||
Artisan::command('inspire', function () {
|
||||
$this->comment(Inspiring::quote());
|
||||
})->describe('Display an inspiring quote');
|
||||
19
routes/web.php
Normal file
19
routes/web.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Web Routes
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Here is where you can register web routes for your application. These
|
||||
| routes are loaded by the RouteServiceProvider within a group which
|
||||
| contains the "web" middleware group. Now create something great!
|
||||
|
|
||||
*/
|
||||
|
||||
// Get File
|
||||
Route::get('/avatars/{avatar}', 'FileManagerController@get_avatar')->name('avatar');
|
||||
|
||||
|
||||
// Landing Page
|
||||
Route::get('/', 'PrivateCloud\FileManagerController@index');
|
||||
Reference in New Issue
Block a user