Skip to content

Tag: laravel

Print specific data to blade view

I can’t find how to print data on the blade.view. I have a list of “customers” on overview.blade.php, and I have a button that redirects to their profile based on their “nCustomerID” (which is blade….

When to use Repository vs Service vs Trait in Laravel? [closed]

Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 1 year ago. Improve this question To avoid code duplication in Laravel, I want to have a method that is …

htmlspecialchars() when print view

I get the error: htmlspecialchars() expects parameter 1 to be string, object given When print the view get the error, I don’t understand what is wrong in my code. I have print and object? How …

How to restrict a user to only see their own profile

I have a view (resources/view/front/auth/profile.blade.php) and my route in file web.php is: My problem is that when a user logs in and gets redirected to their own profile page (http://exmaple.com/profile/2), he/she can change the URL to http://exmaple.com/profile/3 and see other users’ profile. I want…