How to hide null relationships on table
I have a
Table
showing Applications
for Vacancies
(Vacancies
HasMany
Applications
and Applications
BelongsTo
a Vacancy
). When Vacancies
are deleted, any Applications
have their relation set to null
- this is so the person posting a Vacancy
can’t delete an Application
by another user.
I want to try two things:
First idea, how do I filter Applications
will a null
Vacancy
relation? Here’s my current code for show all Applications
and their Vacancy
Second idea - how can I display ‘Deleted vacancy’ if the relationship is null
0 Replies