LoginSignup
0
0

More than 5 years have passed since last update.

【Laravelメモ①】ルーティング第一歩

Posted at

概要

  • Laravelインストール後、ルーティングの簡単な設定を行う
  • 前提:サーバ起動すると、http://localhost:8000 でLaravelのwelcomeページが表示される

メモ

以下の下段を追加。

\[pjDirectory]\routes\web.php
Route::get('/', function () {
    return view('welcome');
});

Route::get('hoge', function () {
   return "hoge";
});

http://localhost:8000/hoge
でhogeが表示される
php artisan serve 等でサーバを起動しておくこと)

0
0
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
0