Shield: access of a page for one user |
(12-30-2022, 06:02 AM)groovebird Wrote:(12-30-2022, 12:17 AM)InsiteFX Wrote: No you can create Groups and give the Groups Permission access rules. If I understand you properly, what you are looking for is not really a group/permission related issue. What you are looking for is how to display a user profile page per user, for instance; A: example.com/user/user_a ~ My name is "User A" B: example.com/user/user_b ~ My name is "User B" C: example.com/user/user_c ~ My name is "User B" If that is the case, define a method/function in your controller and name it `show($user_id)`. Each call to this method is expected to provide a parameter; `$user_id` Inside of the method, call your user model and find the user id; `$user = model(App\Models\UserModel::class)->find($user_id);` for instance. Now, pass the `$user` variable to the view. In your view page, you can now interact with the user property for each users. Mostly, the view is just the same, but with dynamic content ($user); Thanks. |
Welcome Guest, Not a member yet? Register Sign In |