php - How to only show 1 flash message - Laravel -
hello im newbie in laravel need help. want create code 1 flash message show. in case when update user or store appear 2 flash message "user updated successfully" , "store updated successfully". want show 1 flash message.
this code
<div class="content"> @include('flash::message') @include('adminlte-templates::common.errors') <div class="box box-primary"> <div class="box-body"> <div class="row"> {!! form::model($users, ['route' => ['users.update', $store->user_id], 'method' => 'patch']) !!} @include('users.fields',['user'=>$users]) {!! form::close() !!} </div> </div> </div>
<div class="content"> @include('flash::message') @include('adminlte-templates::common.errors') <div class="box box-primary"> <div class="box-body"> <div class="row"> {!! form::model($store, ['route' => ['stores.update', $store->id], 'method' => 'patch' , 'files' => true]) !!} @include('stores.fields') {!! form::close() !!} </div> </div> </div>
remove flash messages divs , add single flash message above.
//add above div , remove others @include('flash::message') <div class="content"> @include('adminlte-templates::common.errors') <div class="box box-primary"> <div class="box-body"> <div class="row"> {!! form::model($users, ['route' => ['users.update', $store->user_id], 'method' => 'patch']) !!} @include('users.fields',['user'=>$users]) {!! form::close() !!} </div> </div> </div> </div> <div class="content"> @include('adminlte-templates::common.errors') <div class="box box-primary"> <div class="box-body"> <div class="row"> {!! form::model($store, ['route' => ['stores.update', $store->id], 'method' => 'patch' , 'files' => true]) !!} @include('stores.fields') {!! form::close() !!} </div> </div> </div> </div>
Comments
Post a Comment