Technical Notes
Why I build with Laravel
Small journal about why I enjoy building web applications with Laravel in todays wide sprawling ecosystem of frameworks and stacks.
What is Laravel?
Laravel is a PHP framework utilized to build modern web applications. It's built on the model view controller architecture or MVC its commonly abbreviated to.
The model handles the application data, such as reading and writing to the database. The controller handles incoming requests and coordinates the logic between the application's data and what is returned to the user, and the view is fairly self explanatory it is what you are serving to the end-user based on data they want.
Controller sits between these and coordinates the data based on logic written in functions. So usually in your web.php file there will be your routes, your route is fetching data from the URL, this fires off a function usually calling the controller of the route, that controller can handle the interactions with the database and the returning of the data. For example the route you went to was /contact and now you filled out the form and clicked send, on your end you seen message was sent, on the backend all of this happens and data is stored and you are verified that message was sent.
How I got started
For my final project in Web Development II at Bemidji State University we had to build our own model view controller architecture website from scratch.
Instead of relying on the baked in features with Laravel that handle authentication, database connections, uploading data, and retrieving data were all manually written in PHP. Building these myself allowed me to solidify my knowledge in what is happening in the back end of web applications.
Once I turned in my final and got an A+ for the course that proved to myself I had a firm understanding of MVC architecture, from there I installed Laravel and begin to write out this website, I started off very basic and looked to improve daily and now I can write this blog post with Laravel, still hand writing code because why not.
What I like about Laravel
One of the things that I enjoy about writing web applications with Laravel is its built-in ecosystem. Authentication can be implemented without having to reinvent the wheel, QoL features like migrations make database changes easy to create, track, and understand.
Delegation of work to each logical portion of the app such as routes, controllers, models, views, migrations, and other components make the codebase clear to read and understand when needing to troubleshoot. Placing new functions directly where they need to be without having to worry about and dependency issues or other bugs is good for clear thinking.
Personally, Laravel is the fine balance of giving me the right features and just enough so that I can build on top of it to create what I envision.