Hi,
description of my problem:
I have departments,projects and tasks. Users are invited/assigned to departments,projects and tasks. And I have two options a) user can see ALL content in group and projects to which he is assigned and b) user can see only content in that specific group to which he is assigned (other content is not visible to user)
So when I create new user I have those to options. In 'users' table I have column "visibility" with values '0' and '1' .
All my models are using eloquent:
User model: http://laravel.io/bin/dJ7P
Task model: http://laravel.io/bin/KRX8
Project model: http://laravel.io/bin/xkm4
So in basic, If I select "user can see only assigned projects and tasks", they can see only those specific projects AND those specific tasks in that project and nothing else. I load projects (which have tasks) in basecontroller with
if (Sentry::check()) {
$user = Sentry::getUser();
$projects = User::find($user->id)->projects;
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community