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 2 years ago.
Improve this question
I have a coded years ago a custom PHP class to create and manage HTML tables.
I'd like to add it in my new Laravel project.
Where do you think it would be the best to put those files ?
Best regards,
Nicolas
It's as you want. Laravel adopts the MVC architecture, if you see that your PHP class deals with databases put it Model folder (/App), if it's dealing with views, put it in views folder (/resources/views) and if it's a controller class you have to put it in controller (/App/Http/Controllers).
But the main thing you have to do is to read the Laravel documentation to understand really how it works. The link for the documentation is https://laravel.com/docs
Related
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 2 years ago.
Improve this question
We have the controllers already being used with many apis in the package
com.mycomp.myapp.controllers
The controllers developed are heavy, so planning to add light weight apis with minimum request parameters.
confused between these two
com.mycomp.myapp.controllers.lite or com.mycomp.myapp.lite.controllers
Can anyone suggest the package names with conventions?
I think you should go with com.mycomp.myapp.controllers.lite.
Because actually you are creating controllers only and now controllers would be distinguished by light or heavyweight. That's why the distinguishing part should be inside the controller package.
Happy coding :)
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 3 years ago.
Improve this question
I would create simple website with forum. I would use Vue JS with Laravel and Bootstrap. Is it good combination? Vue JS is necessary for me, Laravel and Bootstrap can be changed for something else, but I don't know what could be better to use in this situation.
By default, fresh Laravel applications contain an ExampleComponent.vue Vue component located in the resources/js/components directory. Single file components provide a very convenient approach to building
JavaScript driven applications.
https://laravel.com/docs/5.8/frontend#writing-vue-components It is a good approach. Components made in Vue are much easier to handle, as opposed to repeating the same code in different blade templates.
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 3 years ago.
Improve this question
I'm setting up a new laravel project, and want to reduce code in my controllers. Do I need to use repository pattern?”
Do I need to use repository pattern?
Trying to organise your code doesn't directly mean that you "have to" and "need to" use the repository pattern. You can safely use helper classes to extract some of the logic from the controllers. Moreover, Laravel structures its code quite well. You can help it by implementing gateways or using observers where possible. Using events is a possibility too. However, you should be aware of how these things work before implementing them since you might introduce errors with the testing later on.
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 7 years ago.
Improve this question
i am developing website spring mvc , hibernate with my SQL database. my colleagues suggested to me to use free marker or velocity template engine but i'm using jsp template engine .i'm totally confused. So, can anyone please tell me jsp is best or not and why i will go for jsp or?.
Each one of them have some advantages that you could use if you need them, as always with this kind of questions the answers depends on what you want to achieve and how a template engine could help you.
For example, if you want to use the generated HTML pages as working mockups (because you need to show them), I would go for Thymeleaf. This document shows the key differences between Thymeleaf and JSP.
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 9 years ago.
Improve this question
I would like to know what is the different between CodeIgniter and Zend MVC Framework in regarding to coding style?
e.g. Retrieving/Inserting values in the database etc.
The concept are similar but the coding style is different:
Zend Framework uses both table gateway pattern and row gateway pattern but CodeIgniter only uses the later.
If you are asking about the conventions used in naming variables and methods then Zend is different from CodeIgniter. Therefore the coding style are not the same!
Hope it helps!