workflower icon indicating copy to clipboard operation
workflower copied to clipboard

Support for Laravel

Open akoSalman opened this issue 8 years ago • 6 comments

Is it possible to use this package with Laravel? if not, is there any package like this for Laravel framework?

akoSalman avatar Aug 28 '17 06:08 akoSalman

Yes. I think Workflower can be used with Laravel since it only uses Symfony components, not Symfony framework. But you may want well-integrated features such like WorkflowerBundle for Symfony.

iteman avatar Sep 10 '17 11:09 iteman

Did you manage to do this? I need the same thing now, to integrate workflower into Laravel. Could you give me some hints?

lakilevi avatar Jul 04 '18 09:07 lakilevi

@lakilevi No, I didn't use it.

akoSalman avatar Jul 11 '18 09:07 akoSalman

Thanks!

lakilevi avatar Jul 11 '18 09:07 lakilevi

What did you use instead for Laravel?

unpluggedweb avatar Aug 10 '18 22:08 unpluggedweb

I handled it in some tricky way using roles and permissions using this package for Laravel like this:

Each user with a specific role, can(permission) do some specific actions on our object in a specific state. Make permissions with a name like action _state and save those as system data to your database. Permissions example: cancel_pending --> A permission that specifies if a user can cancel an order in pending status. cancel_accepted --> A permission that specifies if a user can cancel an order with status accepted. Then for each role in your system, you can give those permissions and when a user wants to do some action on an order with a specific status, check if the user has/have permission action_status. That's what I'm using in my project, I think it's not a bad idea.

akoSalman avatar Aug 11 '18 07:08 akoSalman