We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Notice the class red in testpage.blade.php
If you reproduce this, the <div class="red"> is moved to the top, all the head data is also put inside the div.
<div class="red">
I believe this has something to do with the @slot inlining
@slot
When I change @slot('value, $firstname) to
@slot('value, $firstname)
@slot('value') {{ $firstname }} @endslot
The problem disappears. So this must clearly be a problem with laravel.
ManagesComponents.php needs to be re-checked for any unthought of implementation issues.
in resources/views create:
resources/views
layouts/test.blade.php
<head> <meta name="" content=""> <style> .red{ margin: 50px; background:red; } </style> </head> <body> <div class="full"> @yield('content') </div> </body>
components/input.blade.php
<div class="item"> <label for="{{ $name }}">{{ $slot }}</label> <input type="{{ $type }}" name="{{ $name }}" placeholder="{{ $slot }}" value="{{ $value }}" > </div>
testpage.blade.php
@extends('layouts.test') <?php $firstname = null; ?> @section('content') <div class="red"> @component('components.input') @slot('name', 'firstname') @slot('type', 'text') @slot('value', $firstname) First Name @endcomponent </div> @endsection ```
The text was updated successfully, but these errors were encountered:
http://i.imgur.com/EZ7W1qL.png here is an image of how it looks with the @slot inlined
http://i.imgur.com/Ovpc6bT.png and this is how it looks with the @slot and @endslot
@endslot
Sorry, something went wrong.
Also, this problem only happens when the $firstname is null or empty, from what i've gathered.
$firstname
null
empty
Fixed in #18246
No branches or pull requests
Description:
Notice the class red in testpage.blade.php
If you reproduce this, the
<div class="red">
is moved to the top, all the head data is also put inside the div.I believe this has something to do with the
@slot
inliningWhen I change
@slot('value, $firstname)
toThe problem disappears. So this must clearly be a problem with laravel.
ManagesComponents.php needs to be re-checked for any unthought of implementation issues.
Steps To Reproduce:
in
resources/views
create:layouts/test.blade.php
components/input.blade.php
testpage.blade.php
The text was updated successfully, but these errors were encountered: