Articles

Showing 10 posts
May 14th, 2025

Disable Event Dispatches when Creating Eloquent Models

Usually during testing, you may want to create a record using a model without dispatching events.

Author
Alex Garrett-Smith
Eloquent
Laravel
May 13th, 2025

How to Check if a View Exists in Laravel

If you're dealing with views in Laravel directly and need to check if a view exists beforehand, here how.

Author
Alex Garrett-Smith
Laravel
May 12th, 2025

How to Dump the Underlying SQL Query From Eloquent

Need to inspect the query being used by Eloquent? Here's how to reveal it.

Author
Alex Garrett-Smith
Eloquent
Laravel
May 10th, 2025

How to Put Laravel Into Maintenance Mode

Laravel ships with the ability to put your application into maintenance mode. Here's a quick guide.

Author
Alex Garrett-Smith
Laravel
May 9th, 2025

Removing Timestamp Columns from Eloquent Models

If you want to exclude the created_at and updated_at columns from a table and disable them in your Eloquent models, here's how.

Author
Alex Garrett-Smith
Eloquent
Laravel
May 8th, 2025

Access Laravel Route Model Binding Values in Form Requests

Using form requests? Let's figure out how to access values that you're resolving with route model binding.

Author
Alex Garrett-Smith
Laravel
May 7th, 2025

Calculating Reading Time of Content in PHP

Here's a quick and easy way to calculate the read time of any content in PHP, like the article you're reading now!

Author
Alex Garrett-Smith
PHP
May 7th, 2025

How to Change the Order of Migrations in Laravel

If you need to change the order of how migrations are run in Laravel, you just need to adjust the file name.

Author
Alex Garrett-Smith
Laravel
March 24th, 2025

How to Create Custom Blade Directives in Laravel

Blade provides a whole host of directives to make templating easier. However, sometimes you need to create your own custom directive to save repeating yourself and clear up your Blade templates.

Author
Alex Garrett-Smith
Laravel
March 21st, 2025

Textarea User Mentions in Laravel — A Full Guide

This guide covers the process of implementing mentionable things in Laravel (usually users) from start to finish.

Author
Alex Garrett-Smith
Laravel
Alpine.js

Tags