mercredi 17 mars 2021

LARAVEL - How to see if an application for user already exists

For a job board application, trying to see if an application is already present for the job post for the user so the apply button isn't displayed any longer. This is my code currently. I'm guessing I may have to pass in the $job->id somewhere? Any idea how to check this? Thanks!

@if ((auth()->user()->applications()->job()->count() >= 1)) YOU HAVE ALREADY APPLIED @else APPLY NOW @endif



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire