PHP code example of nevestul4o / network-controller
1. Go to this page and download the library: Download nevestul4o/network-controller 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/ */
use Nevestul4o\NetworkController\Controllers\ImagesController;
use Nevestul4o\NetworkController\Controllers\UploadController;
Route::get('images/{width}/{name}', [ImagesController::class, 'getImage'])->name('get-image');
Route::post('upload', [UploadController::class, 'uploadSubmit']);
use Nevestul4o\NetworkController\Controllers\Auth\LoginController;
use Nevestul4o\NetworkController\Controllers\Auth\ChangePasswordController;
Route::post('login', [LoginController::class, 'login'])->name('login');
Route::get('login', [LoginController::class, 'login'])->name('getCurrentUser');
Route::post('logout', [LoginController::class, 'logout'])->name('logout');
Route::post('change-password', [ChangePasswordController::class, 'changePassword'])->name('changePassword');
Route::post('change-password-forced', [ChangePasswordController::class, 'changePasswordForced'])->name('changePasswordForced');