0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

HTMLからlaravelへ移行 初心者メモ

Last updated at Posted at 2019-09-25

views→layoutsの中にuser.blade.phpを入れる

user.blade.phpにはHTMLで作ったindex.htmlが入っている

viewsの中にtop_page.blade.phpを作る

{{-- layouts/layout.blade.phpを読み込む --}}
@extends('layouts.layout')

route→web.phpでルーティング設定

Route::get('top_page', 'TopPageController@index');
初心者のうちは纏めたりせず1つずつルーティング設定した方がわかりやすい
top_pageにアクセスされると、top_page_controllerのadd関数に接続

controllers→TopPageController.php作成

public function index()
{
return view('top_page');
}
add関数に接続され、top_page.blade.phpを読み込む

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?