0
私はフォーム:: ::フォームを開いて$ userを追加すると、ページレイアウトはなくなりました。これは、私はそれがうまく動作し、すべてのレイアウトが完全にそこに使用する場合、私は意味します。laravel集合的なhtmlフォームモデルは、スタイルとレイアウトを失うという奇妙なケースを与えています
{!! Form::open(['method'=>'PATCH', 'action'=>['[email protected]', $user->id], 'files'=>true , 'class'=>'form-horizontal']) !!}
しかし、以下のコードで編集ページでユーザーの詳細を取得しようとすると、編集ページのすべてのレイアウトとスタイルが消えます。
{!! Form::model($user, ['method'=>'PATCH', 'action'=>['[email protected]', $user->id], 'files'=>true , 'class'=>'form-horizontal']) !!}
クロムは、cssファイルを取得できないというエラーを検出しません。そのようなlaravel滴はそれのすべてを落とす。以下は編集ページの私の完全なコードです。
{!! Form::model($user, ['method'=>'PATCH', 'action'=>['[email protected]', $user->id], 'files'=>true , 'class'=>'form-horizontal']) !!}
<div class="form-group">
{!! Form::Label('name', 'Name:', ['class'=>'col-sm-3 control-label']) !!}
<div class="col-sm-9">
{!! Form::text('name', null, ['class'=>'form-control','placeholder'=>'Full Name']) !!}
</div>
</div>
<div class="form-group">
{!! Form::Label('email', 'Email:', ['class'=>'col-sm-3 control-label']) !!}
<div class="col-sm-9">
{!! Form::email('email', null, ['class'=>'form-control','placeholder'=>'[email protected]']) !!}
</div>
</div>
<div class="form-group">
{!! Form::Label('password', 'Password:', ['class'=>'col-sm-3 control-label', 'for'=>'password']) !!}
<div class="col-sm-9 strength-container">
{!! Form::password('password', ['class'=>'password-strength-example1 form-control', 'id'=>'password', 'data-plugin'=>'strength']) !!}
</div>
</div>
<div class="form-group">
{!! Form::Label('is_active', 'Active:', ['class'=>'col-sm-3 control-label']) !!}
<div class="col-sm-9">
{!! Form::hidden('is_active', 0) !!}
{!! Form::checkbox('is_active', 1, null, ['data-plugin'=>'switchery']) !!}
</div>
</div>
<div class="form-group">
{!! Form::Label('role_id', 'Role:', ['class'=>'col-sm-3 control-label']) !!}
<div class="col-sm-9">
{!! Form::select('role_id', $roles ,null, ['class'=>'form-control']) !!}
</div>
</div>
<div class="form-group form-material">
{!! Form::Label('photo_id', 'Photo:', ['class'=>'col-sm-3 control-label', 'for'=>'photo_id']) !!}
<div class="col-sm-9">
{!! Form::text('', null, ['class'=>'form-control', 'placeholder'=>'Browse..', 'readonly'=>'']) !!}
{!! Form::file('photo_id', null, ['multiple'=>'']) !!}
</div>
</div>
<div class="form-group">
<div class="col-sm-9 col-sm-offset-3">
{!! Form::submit('Submit', ['class'=>'btn btn-primary']) !!}
{!! Form::reset('Reset', ['class'=>'btn btn-danger']) !!}
</div>
</div>
{!! Form::close() !!}
が本当に近いです。あなたの答えは、近くの情報源を特定するのに役立ちました。それはあなたのラインの上のラインでした。私はそれを編集しました。 {!!フォーム::テキスト( 'photo_id'、null、['class' => 'フォームコントロール'、 'プレースホルダー' => 'ブラウズ..'、 'readonly' => ''])}}空の。ありがとうございました。 –