Skip to main content
Wafy's Tools

Main navigation

  • Home
  • About
  • Framework Learning

Breadcrumb

  1. Home
  2. Updating my PHP Framework Knowledge.

Laravel - Our first model

By Jeff , 28 May, 2026

I am beginning to see the appeal of Laravel. There are a lot of built in functions for the database and models. Learned about some new features of PHP 8 that hadn't tried to use also. Between the database and the models there are a lot of the basic functions built it, even some not so basic ones. For example there is a latest function for the model that will look at the latest entries based on the timestamps automatically. As long as your fields match their expected names, it just works.

For Laminas, I had built some similar functionality, but not at this level. For me it was more of specialized tables like only one or authentication. This kind of negates the need for that. The models become relatively compact in Laravel. A lot of the relational information is simple to add and is a short function. Even accessing data from a model and it's relations, makes things easy.

The Blade view model is kind of growing on me as well. While I still think it is a bit much on overhead, it does make the view a bit easier to read. In this lesson they make use of a @forelse statement. Which is kind of need, it replaces a null check and foreach statement. I might have to dig into it and look at how they are parsing it. They also show the {{ escape again for the PHP code. Might be worth the trade off if you have a lot of views that utilize those functions.

Looks like the next lesson focused more on the View and some other components. 

Taxonomy
Javascript
PHP

Book navigation

  • Laravel - Creating and storing Chirps
  • Laravel - Edit and delete Chirps
  • Laravel - Getting Setup
  • Laravel - Our first model
  • Laravel - Showing the feed
  • Laravel - What is MVC?
  • Laravel - Working with the database
  • Laravel - Your First Route
RSS feed