LoginSignup
0
0

More than 3 years have passed since last update.

PHP Laravel 6 おすすめ映画投稿サイト作成過程 8:ジャンルタグ追加編(後編)

Posted at

controllerとviewファイルの作成

recommendsのviewファイルを複製して使用しました。
他のviewファイルも同様です。

recommend/resources/views/tags/create.blade.php
@extends('layouts.app')

@section('content')
<div class="container">
    <div class="row justify-content-center">
        <div class="col-md-8">
            <div class="card">
                <div class="card-header">{{ __('Login') }}</div>

                <div class="card-body">
                    <form method="POST" action="{{route('tags.store')}}">
                        @csrf
                        <table>
                            <thead>
                                <tr>
                                    <th>タグ</th>
                                </tr>
                                <tr>
                                    <th><input type="text" name='title'></th>
                                </tr>
                            </thead>
                        </table>
                        <button type="submit">登録</button>
                        <a href="{{route('recommends.index')}}">一覧に戻る</a>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
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