vendredi 30 novembre 2018

Laravel - Cannot Un Delete and Display Data using Soft Delete

Hello I cannot un delete my data why is it? here is my code

on the Controller

   public function displayArchive()
{
    $clients = Client::withTrashed();
    return view('admin.clients.homeArchive')->with('clients', $clients);
}

one the View

 <table class="table table-bordered" id="dynamic_field">  
           <tr>  
              <th>Client Code</th>
              <th>Client Name</th>
              <th>Address</th>
              <th>Tel No.</th>
              <th>Contact Person</th>
              <th>Mobile No.</th>
              <th>Email Address</th>
              <th>Website</th>
              <th>Status</th>
              <th>Update</th>

           </tr>  
           @foreach ($clients as $client)
           <tr>
               <td></td>
               <td></td>
               <td></td>
               <td></td>
               <td></td>
               <td></td>
               <td></td>
               <td></td>
               <td><a href="#" class="btn btn-danger">Inactive</a></td>
               <td><a href="/admin/clients//edit" class="fa fa-edit btn btn-primary"></a></td>

           </tr>      
           @endforeach

        </table>  

on the Web Here you can see how I call my controller and view pages.

Route::get('/admin/clients/homeArchive', 'Admin\ClientsController@displayArchive');



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2DXiX2b
via IFTTT

Aucun commentaire:

Enregistrer un commentaire