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> 

this view of 2 flash message user

this view of 2 flash message store

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

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -