#bladeによるレイアウトの継承でつまずいています。どなたか教えて頂きたいです。
##問題:共通する部分をベースレイアウトにして個別レイアウトを表示させたいがエラーが出てしまい先へ進めません。
エラー文
Facade\Ignition\Exceptions\ViewException Cannot end a section without first starting one. (View: /Users/yokonohidekazu/Desktop/laravel/test_app/resources/views/Lessons/New.blade.php) http://localhost:8000/New
views/layouts/Loginapp.blade.php
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="utf-8"> <title>@yield('title')</title> <link rel="stylesheet" type="text/css" href="login.css" media="all" /> <style> body, p, form, input { margin: 0 } #form { width: 350px; margin: 30px auto; padding: 20px; border: 1px solid #555; } form p { font-size: 14px; } .form-title { font-size: 30px; text-align: center; margin-bottom: 20px; border-bottom: solid 3px #fff; " } .name { margin-bottom: 20px; } .mailaddress { margin-bottom: 20px; } .password { margin-bottom: 20px; } .confirm password { margin-bottom: 20px; } input[type="text"], input[type="password"] { width: 350px; padding: 4px; font-size: 14px; margin: 0 auto; } .submit { text-align: center; } /* skin */ #form { background: #053352; background-image: -webkit-linear-gradient(top, #053352, Courier New); background-image: -moz-linear-gradient(top, #053352, Courier New); background-image: -ms-linear-gradient(top, #053352, Courier New); background-image: -o-linear-gradient(top, #053352, Courier New); background-image: linear-gradient(to bottom, #053352, Courier New); -webkit-border-radius: 6; -moz-border-radius: 6; border-radius: 6px; font-family: Courier New; color: #ffffff; font-size: 20px; padding: 20px 20px 20px 20px; text-decoration: none; } .submit input { background: #f78181; background-image: -webkit-linear-gradient(top, #f78181, #f78181); background-image: -moz-linear-gradient(top, #f78181, #f78181); background-image: -ms-linear-gradient(top, #f78181, #f78181); background-image: -o-linear-gradient(top, #f78181, #f78181); background-image: linear-gradient(to bottom, #f78181, #f78181); -webkit-border-radius: 8; -moz-border-radius: 8; border-radius: 8px; -webkit-box-shadow: 1px 1px 3px #666666; -moz-box-shadow: 1px 1px 3px #666666; box-shadow: 1px 1px 3px #666666; font-family: Courier New; color: #ffffff; font-size: 16px; padding: 10px 20px 10px 20px; text-decoration: none; } .submit input:hover { background: #f5c7c7; background-image: -webkit-linear-gradient(top, #f5c7c7, #f5c7c7); background-image: -moz-linear-gradient(top, #f5c7c7, #f5c7c7); background-image: -ms-linear-gradient(top, #f5c7c7, #f5c7c7); background-image: -o-linear-gradient(top, #f5c7c7, #f5c7c7); background-image: linear-gradient(to bottom, #f5c7c7, #f5c7c7); text-decoration: none; } #form { background: #053352; background-image: -webkit-linear-gradient(top, #053352, Courier New); background-image: -moz-linear-gradient(top, #053352, Courier New); background-image: -ms-linear-gradient(top, #053352, Courier New); background-image: -o-linear-gradient(top, #053352, Courier New); background-image: linear-gradient(to bottom, #053352, Courier New); -webkit-border-radius: 6; -moz-border-radius: 6; border-radius: 6px; font-family: Courier New; color: #ffffff; font-size: 20px; padding: 20px 20px 20px 20px; text-decoration: none; } </style> </head> <body> <br> <br> <br> <br> <br> <br> <div id="form"> <p>@yield('title')</p> <form method="POST" action="/Login"> @yield('form') </form> </div> </body> </html>
views/lessons/New.blade.php
@extends('layouts.Loginapp') @section('title','Sign Up') <p class="form-title">SignUp</p> @endsection @section('form','SignUp') <p>Name</p> <p class="name"><input type="text" name="name" maxlength="32" autocomplete="OFF" /></p> <p>Mailaddress</p> <p class="mailaddress"><input type="text" name="mailaddress" maxlength="32" autocomplete="OFF" /></p> <p>Password</p> <p class="password"><input type="password" name="password" maxlength="32" autocomplete="OFF" /></p> <p>Confirm Password</p> <p class="Confirm password"><input type="password" name="Confirm password" maxlength="32" autocomplete="OFF" /></p> <p class="submit"><input type="submit" value="登録" /></p> @endsection
回答1件
あなたの回答
tips
プレビュー