I have problems in my laravel 5.5 project

0

This error appears:

  

SQLSTATE [42S22]: Column not found: 1054 Unknown column 'clients.deleted_at' in 'where clause' (SQL: select * from clientes where clientes . deleted_at is null)

Generate my controllers and my views with the generator infyom and when I want to access the route to create a client this happens to me.

    
asked by albertolg89 07.02.2018 в 17:28
source

1 answer

1

The error is because the Laravel database manager looks for the column deleted_at in your table clientes , and that column does not exist. Laravel uses that column to enable the "soft deleting" feature (See Laravel 5.5 documentation ).

You have two options:

  • Create column deleted_at in table clientes . It must be of type DATETIME or similar.
  • Disable the "soft deleting" by deleting (or commenting) on your model Clientes the line that says protected $dates = ['deleted_at']; .
  • answered by 07.02.2018 в 19:07