A
A
Abc Edc2016-01-21 11:38:38
Laravel
Abc Edc, 2016-01-21 11:38:38

Is it correct to keep route annotations to the entity in the configs in the laravel project in particular?

I make my own ACL, there is nowhere to retreat.
The entry in the table is
id role_id access
1 1 someEntity.create (this is taken from Laravel named routes)
And here, in one of the tasks, you need to select some data from the company entity that is tied specifically to access. Is it normal if I store in the configs the correspondence of the named route, namely its left part (someEntity)
to the model and the exact name of the table. True, the list will go to the floor, since there are not a few entities

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Pochepko, 2016-01-21
@gleber1

I didn't really understand the description, but as far as I understand you want to restrict access to certain entities using ACLs? What happens if new objects are added? Will you add them there too? If this is what I understand, then rather you need to pay attention to objects of type Request (Request Validation) is in 5.0 or in 5.1 Policies they give the functionality of restricting access to certain objects. For example, only the owner of a post can edit it. where Auth::user()->id == $Post->author_id is something like that. If that's not it, then correct me.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question