/** * Bind data to the view. * * @param View $view * @return void */ public function compose(View $view) { $tasks = $this->tasks->find($view->getData()['tasks']['id']); /** * [User assigned the task] * @var contact */ $contact = $tasks->assignee; $client = $tasks->clientAssignee; $view->with('contact', $contact); $view->with('client', $client); }