Blog

Page 289 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Add a custom attribute to a Laravel / Eloquent model on load?

Add a custom attribute to a Laravel / Eloquent model on load?

Published on September 2, 2023

šŸ“ **Blog Post: Adding a Custom Attribute to a Laravel/Eloquent Model on Load** šŸ‘‹ Hey there, fellow Laravel developer! Have you ever wanted to add a custom attribute to a Laravel/Eloquent model when it is loaded? Like, without having to use a loop? We'v

Cover Image for Disable Laravel"s Eloquent timestamps

Disable Laravel"s Eloquent timestamps

Published on September 2, 2023

# How to Disable Laravel's Eloquent Timestamps So, you're converting your web application from CodeIgniter to Laravel, but you're facing an issue with Laravel's Eloquent timestamps. You don't want to add the `updated_at` and `created_at` fields to all of

Cover Image for Laravel Eloquent: Ordering results of all()

Laravel Eloquent: Ordering results of all()

Published on September 2, 2023

# Laravel Eloquent: Ordering results of all() 🌟 Welcome back, tech enthusiasts! Today, we're going to tackle a common issue that many Laravel developers face when using Eloquent: ordering the results obtained from the `all()` method. Don't worry, we'll g

Cover Image for Laravel: How to Get Current Route Name? (v5 ... v7)

Laravel: How to Get Current Route Name? (v5 ... v7)

Published on September 2, 2023

# Laravel: How to Get Current Route Name? (v5 ... v7) šŸ˜Ž Hey there, Laravel enthusiasts! šŸ‘‹ Are you feeling a little lost when it comes to retrieving the current route name in Laravel v5, v6, or even v7? Don't worry, you're not alone! šŸ˜… In previous vers

Cover Image for "Please provide a valid cache path" error in laravel

"Please provide a valid cache path" error in laravel

Published on September 2, 2023

# How to Fix the "Please provide a valid cache path" Error in Laravel 😟 If you're encountering the "Please provide a valid cache path" error in Laravel, you're not alone! This error usually occurs when you duplicate a working Laravel app and encounter is

Cover Image for How to remove /public/ from a Laravel URL

How to remove /public/ from a Laravel URL

Published on September 2, 2023

# How to Remove /public/ from a Laravel URL If you're using Laravel 5 and find the "/public/" fragment in the URL to be awkward when switching between projects, you're not alone. Luckily, there are some easy solutions to remove it without running a VM or

Cover Image for How do you check "if not null" with Eloquent?

How do you check "if not null" with Eloquent?

Published on September 2, 2023

šŸ” How to Check "if not null" with Eloquent? šŸ” Have you ever wondered how to check if a field is not null with Eloquent? šŸ¤” Don't worry, you're not alone! Many developers have faced this common issue when working with Laravel's Eloquent ORM. But fear not

Cover Image for How to sort a Laravel query builder result by multiple columns?

How to sort a Laravel query builder result by multiple columns?

Published on September 2, 2023

šŸ’”**Title: Sorting a Laravel Query Builder Result by Multiple Columns: A Comprehensive Guide** Intro: Hey tech enthusiasts, ever found yourself dreading the complex process of sorting data in Laravel? Well, fear no more! In this guide, we'll walk you thro

Cover Image for Laravel Migration Change to Make a Column Nullable

Laravel Migration Change to Make a Column Nullable

Published on September 2, 2023

šŸ“šŸ’» Laravel Migration Change to Make a Column Nullable šŸ’”šŸ”€ Are you facing a situation where you need to modify a Laravel migration to make a column nullable? šŸ˜• Don't worry, we've got you covered! 🤩 In this blog post, we will address this common issue

Cover Image for Facebook OAuth "The domain of this URL isn"t included in the app"s domain"

Facebook OAuth "The domain of this URL isn"t included in the app"s domain"

Published on September 2, 2023

# Troubleshooting Facebook OAuth: "The domain of this URL isn't included in the app's domain" 🚫 Are you struggling with setting up Facebook OAuth for your application? Have you encountered the frustrating error message "The domain of this URL isn't inclu