You probrably have an error in your table name. For default, laravel will look for cards
table name for a model named Card
. Also, take a look in your models name. I espect you misstype card.php
because it should be Card.php
. Laravel uses a lot of psr convention and Eloquent (who deal with relationships and that stuff). If you are not well versed into it, take a look in how to name classes. As Alireza said, take a look in the Laravel's documentation, it is awesome and complete. When you have a one to many realtionship, one of they should have a hasMany(...)
instead belongsTo(....)