user122222
user122222

Reputation: 2449

Lumen project structure

I'm beginner at Lumen (and php) and I am a bit confused all the structure as the only people I talked about Lumen to were interns just like me. I created a project where I use Models where all my methods and functions are, I have constructor in my controller class where I call functions from class Model.php and then pass that to view.blade.php (in resources folder) where all my html goes. I return view from controller. My question, is that correct? Should I have class for view? If my structure is not correct, how should it look? What correct sequence of passing information should be then? Thank you in advance for claryfing it for me :) I know MVC structure should be similar to .NET but still I am confused somehow.

Upvotes: 0

Views: 1576

Answers (1)

GiamPy
GiamPy

Reputation: 3570

You should not use Lumen for a fully-fledged application with HTML views, assets, etcetera.

Lumen is a microframework specifically designed to build APIs in a lightweight environment, which allows you to focus entirely on the resources to serve, instead of the design.

Lumen is way faster compared to Laravel, for example the Routing is handled by FastRoute instead of Illuminate Routing, which is quicker and lighter for the application.

Use Laravel for what you are trying to do.

Upvotes: 3

Related Questions