Blog

belongsTo() and withTrashed() – linking to deleted row

Let’s say we have DB table products, which is linked to table categories with a field products.category_id = categories.id, Eloquent helps us to define a relation easily....

APLICATIONS

belongsTo() and withTrashed() – linking to deleted row

Let’s say we have DB table products, which is linked to table categories with a field products.category_id = categories.id, Eloquent helps us to define a relation easily....