1. Go to this page and download the library: Download lovefc/laravel-route-notes 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/ */
lovefc / laravel-route-notes example snippets
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Models\User;
#[annotate('true')]
class UserController extends Controller
{
#[get('/show')]
public function show()
{
return view('welcome');
}
}
namespace App\Http\Controllers;
use Illuminate\Http\Request;
#[annotate('true'),group(['prefix' => '/home','middleware'=>'auth'])]
class MyController extends Controller
{
#[get('/show')]
public function show()
{
echo 'show';
}
#[get('/show2')]
public function show2()
{
echo 'show2';
}
}
namespace App\Http\Controllers;
use Illuminate\Http\Request;
#[annotate('true')]
class My2Controller extends Controller
{
#[get('/')]
public function show()
{
return view('welcome');
}
#[get('/login'),name('login')]
public function login()
{
return view('welcome');
}
#[get('/show3'),group(['prefix' => '/home','middleware'=>'auth'])]
public function show2()
{
echo 'show3';
}
}
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\My2Controller;
use App\Http\Controllers\MyController;
Route::get("/",[My2Controller::class,"show"]);
Route::get("/login",[My2Controller::class,"login"])->name("login");
Route::group(['prefix'=>'/home','middleware'=>'auth'],function(){
Route::get("/show3",[My2Controller::class,"show2"]);
Route::get("/show",[MyController::class,"show"]);
Route::get("/show2",[MyController::class,"show2"]);
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.