LoginSignup
0
1

More than 1 year has passed since last update.

Laravelのルーティングでパスを取得

Last updated at Posted at 2021-06-04

URLを取得できるコマンド

$uri = \Route::current()->uri();

<?php

Route::get('/practice', function () {
    return '現在のURL:'.$uri = \Route::current()->uri();
});

image.png

コマンド

cd laravel_bbs

php artisan serve --port=$PORT

preview ボタンを押下

preview ボタンを押下

https://ドメイン名/practiceで検索

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1