Chapter 8 "Adding Users To Projects" page no 210

i followed all instruction from book section "Adding Users To Projects".

when i am first time adding a new user and role according to book’s page number 210 screenshot.

i am getting following error message instead of short flash message indicating success.


Project and its behaviors do not have a method or closure named "associateUserToRole".

plz get screenshot for details.

i added following in the project.php class file and resolved.

public function associateUserToRole()


    return 1;