Work With Models

we build some method for you to make your job easy , lets go to see these

User

First of all our models in app/Models directory, it’s better for develop.

get events who I created:

$user->myEvents();

get events who I invited:

$user->invitedEvents();

get invitations who get from other users:

$user->received_invitations();

get invitations you sended to other users:

$user->send_invitations();

Events

get if giving user created this event

$event->isCreator($user);

get if giving user invited to this event

$event->isInvited($user);

get if giving user member of this event

$event->isMember($user);

get event sended invitations

$event->invitations();

get event members (they are accepted a invitation)

$event->members();

Invitation

get invitation related event

$event->event();

get invitation invitor user

$event->invitor();

get invitation invited user

$event->invited();