laravel

All my posts about laravel.

Eloquent MySQL views

stitcher.io

My colleague Brent explains how you can easily work with MySQL views in Laravel.

MySQL views are a way of storing queries on the database level, and producing virtual tables with them. In this post we'll look at why you want to use them and how they can be integrated in Laravel with Eloquent models.

Read more [stitcher.io]

The Laracon US videos have been released original

by Freek Van der Herten – 1 minute read

Laracon US was held in July 2018 at the Museum of Science and Industry in Chicago. I had the pleasure of speaking at the conference. You can watch my talk on v7 of our medialibrary below. Though there isn't a playlist to hold them yet, you can view recordings of all other talks on the StreamACon…

Read more

Join 9,500+ smart developers

Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.

No spam. Unsubscribe anytime. You can also follow me on X.

Introducing our Laravel Nova packages original

by Freek Van der Herten – 3 minute read

Introducing our Laravel Nova packages Laravel Nova is a beautiful admin panel that was first showcased at Laracon 2018 by Laravel creator Taylor Otwell. Using Nova building rich admin panels is a breeze. Nova was released today. Taylor was kind enough to give us early access to Nova shortly after…

Read more

Laravel by the numbers

jason.pureconcepts.net

Laravel Shift is a service that can help upgrade a Laravel app. The creator of the service, Jason McCreary, published some interesting statistics on the Laravel apps that were upgraded by the service.

At the time of this writing, Shift has upgraded over 8,500 Laravel apps. Every time a Shift runs a log file is created. Initially, these log files were for debugging. A way for me to not only offer support, but log events that let me know how I might improve the services.

Read more [jason.pureconcepts.net]

Introducing Laravel Nova

medium.com

At Laracon US 2018 [Taylor Otwell] introduced Laravel Nova, a very shiny admin panel for Laravel applications.

I’m thrilled to announce the newest member of the Laravel ecosystem: Laravel Nova. Nova is a beautifully designed administration panel for Laravel. We’ve sweat the small details and carefully crafted Nova to not only look great, but to be a joy to work with.

Read more [medium.com]

A new website for Spatie: backend highlights original

by Freek Van der Herten – 7 minute read

For the first time in 4 years we completely redesigned our company website. We launched it today. The site is a simple Laravel app with some technical niceties. True to form we also open sourced the app, you can find the code in this repo on GitHub. In this blogpost I'd like you to give you a tour…

Read more

Take a look into your Laravel views

github.com

Marcel Pociot, serial open source creator, released another cool Laravel package.

When your Laravel project grows, so do the Laravel views. Sometimes it might be hard to figure out, which part of the output HTML was rendered using which template. With this package, you can take a peek into your Laravel views and find out which template is responsible for which part of the output HTML.

Read more [github.com]

Using Laravel Mailables and Notifications as Event Listeners

themsaid.com

In an older post on his blog Mohammed Said, Laravel Employee #1, shares a cool trick on how to avoid having to create an event listener.

Instead of having to create a class for the listener and another for the notification/mailable, wouldn't it be cool if we can register the Notification/Mailable as an event listener? ... While some may consider this an anti-SRP hack I think it's a pretty neat implementation that you can use in your application to prevent creating an extra listener class, your call :)

Read more [themsaid.com]

A short introduction to laravel-event-projector original

by Freek Van der Herten – 1 minute read

The last few months I've been working on a package called laravel-event-projector. This package aims to be a simple and very pragmatic way to get started with event sourcing in Laravel. Ahead of it's release, which will happen in a few days, I've recorded a small video introduction. You can find the…

Read more

How to rid your database of PHP class names in Eloquent's Polymorphic tables

josephsilber.com

Joseph Silber, a very active Laravel contributor, has written a new blogpost on morph maps, a feature to decouple your database from your model class names.

Polymorphic relations let you set up a relationship between many different model types, without the need for extra tables. This works by storing the "morphable type" (explained below) in the database, in addition to the morphable type's ID. By default, the morphable type stored in the database is the model's full class name. While this works, it tightly couples your database to your PHP application. Let's look at how we can instruct Eloquent to use more generic values for these morphable types.

Read more [josephsilber.com]