Is it possible to create custom relationships in Laravel like this,
SELECT tasks.*
FROM tasks
LEFT JOIN priorities ON tasks.priority_identifier LIKE CONCAT('%', priorities.identifier)
WHERE priority.id = 10
I could use query builder to create this join but how can i return this as a laravel relationship ?
Edit
I'm trying to do this without using existing relationship methods(hasMany, hasOne etc)