Blog
May 29, 2022
Cheatsheet - Use Tailwind CSS for outgoing emails in Laravel
Full credit goes to: https://ralphjsmit.com/laravel-emails-tailwind-css, i've only condesned a few things. Assuming Tailwind is installed, you can use the following steps to style your emails:
ReadFebruary 27, 2022
Cheatsheet - Setup Redux-toolkit with Laravel and Next.js
Here is a cheatsheet for setting up Redux toolkit with Next.js on the frontend, and Laravel api on the backend. The Next.js frontend is a clone Laravel Breeze Next.js Edition. Laravel is a basic...
ReadMarch 10, 2021
Cheatsheet - Register a private github repository in a Laravel app
How to register a package in Laravel from a private github repository, without registering it with packagist.
Update the composer file of your project. Add the following to your require
...
March 10, 2021
Cheatsheet - Register a local laravel package during development
How to register a package in Laravel from a local folder, during package development. I am a big fan of Spatie's package skeleton repo. Its a really good starting point for package development. Use...
ReadAugust 27, 2020
Debugging uploads in Laravel
Recently while debugging a file upload issues, i came accross a few helper methods that can save a lot of time.
Uploaded file returns a instant of Illuminate\Http\UploadedFile
, which...
August 23, 2020
Laravel file uploads limits
Over the years, Laravel file uploads have gotten so simple that most of the time they just work. Livewire has also added file uploads to its api. However there are some issues that can pop up when...
ReadMay 30, 2020
Livewire component that updates the cart counter
Let's say we have a button that adds a product to the cart dynamically. Maybe it does this through VueJS component, Javascript, or in our case a Livewire component. We want to update the counter...
ReadMay 24, 2020
Handling Laravel's 'ModelNotFoundException' globally
Update: See bottom of article to see how to handle while declairing the route. Laravel offers a pretty elegant way of handling exceptions. Let's say you wanted to retrieve a record from a database,...
ReadMay 18, 2020
How to filter a list using Laravel query builder and checkboxes
We have a list of products that we need to filter. For example, we have a storefront that sells sporting apparel. Each product has a brand (Nike, Adidas etc.) and a category (t-shirts, shoes etc.)....
ReadMay 15, 2020
Ubuntu LAMP setup for Laravel
If you need a local server for testing, or want to set up a production server, below are the step-by-step instructions on how to install a Ubuntu server. The focus will be on setting up a LAMP stack...
Read