Closed hosseinjarrahi closed 1 month ago
Hey @hosseinjarrahi. Laravel Purity looks for relation inside your model and have nothing to do with your schema. Define relation in your contents model.
// Content.php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class Content extends Model
{
/**
* Get all of the categories that this content belongs to.
*/
public function categories()
{
return $this->morphToMany(Category::class, 'categorizable');
}
}
hi bro, i have a many to many RelationShip
this is my filter string domain.com/route?filters[categories][id][$eq]=1
but it Does not work