W
W
warcevil2016-09-16 18:43:08
Laravel
warcevil, 2016-09-16 18:43:08

How to make a website in laravel5?

I have little experience with frameworks, but recently I decided to seriously start learning laravel, as it seemed more friendly for beginners and at the same time quite powerful. Tell me how the following things are implemented in it:
1. Inserts. For example, I just need to make some kind of insert in the template (for example, a logo edited directly in the admin panel or a sidebar on each page of the template). What is the best way to do this? While I solve this problem with the help of widgets, but it seems there is some more correct way.
2. I wonder what the gurus do when they need to implement, for example, comments or a rating system for materials. Do they write their own modules or use ready-made solutions?
3. It is not clear how to make access control the best way. I searched for a suitable solution, but did not find anything sensible.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
D', 2016-09-17
@Denormalization

1) What are widgets? There are no widgets in Laravel. It is possible to give the necessary data for global templates through the View Composer.
2) It makes no sense to use some ready-made packages. Either you use your own experience, or you write for a specific project. As a last resort, there is disqus.
3) Everything about access control is in the documentation https://laravel.com/docs/5.3/authorization For roles, you can use the https://github.com/Zizaco/entrust
package. questions will disappear. Laravel has one of the best documentation. For everything else, there are laracasts.

A
AlikDex, 2016-09-16
@AlikDex

for example, we write the logo directly through the img tag in the template. No fucking widgets are needed for this, as well as editing in the admin panel. The operation is one-time, and you can fix it with handles if something happens. And with the widget, this crap will be generated with every call. Do you need it?
Comments looking for ready-made modules. Let's see if they suit us. If yes, then we set it. No - we remake the closest one, or write a new one.
Access control. Depends on the task. If users are divided into admin \ non-admin, then it is enough to add a flag in the user table. If something is more complicated, then you should look for some extensions \ modules \ bundles. What are they called there. In short, see what is ready, probably it will suit you already. If something is non-standard and perverted, then write it yourself, of course, having previously studied how to solve the problem.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question