Posts by tag: laravel

Mastering PHPStan: Common Errors and How to Fix Them

phpstan | static code analysis | Laravel

Mastering PHPStan: Common Errors and How to Fix Them

PHPStan is a static analysis tool for PHP that focuses on finding bugs in your code withou...

David Carr

4 min read -

Mocking Stripe in Laravel with Stripe Mock Server

Stripe Mock | Stripe Integration | stripe | Laravel

Mocking Stripe in Laravel with Stripe Mock Server

If you've ever tried to test your Stripe integration, you'll know how challenging it can b...

David Carr

2 min read -

Customize Your Hashnode Blog Frontend with Headless Frontend and Laravel

David Carr

2 min read -

How to disable Laravel console commands

Laravel | console | Commands

How to disable Laravel console commands

Suppose you find yourself in a situation where you need to disable or intercept a console...

David Carr

2 min read -

Creating Flexible Layouts in Laravel with Yields, Includes, and Slots

Laravel | yield | include | slots | layouts

Creating Flexible Layouts in Laravel with Yields, Includes, and Slots

Yields In Laravel, the @yield directive is used in blade templates to define a section tha...

David Carr

7 min read -

Enhancing Laravel Applications with Traits: A Step-by-Step Guide

code-reuse | Laravel | traits

Enhancing Laravel Applications with Traits: A Step-by-Step Guide

What are traits? Traits are a mechanism for code reuse. Traits allow you to create methods...

David Carr

4 min read -

Laravel ApiResouce name nested route placeholder

Laravel | routes | nested | placeholders

Laravel ApiResouce name nested route placeholder

When using an ApiResource that has more than one placeholder it may seem tricky to figure...

David Carr

2 min read -

My process for writing Laravel packages

Laravel | packages

My process for writing Laravel packages

Introduction I was asked recently how I started when writing new Laravel packages. In this...

David Carr

12 min read -

Laravel Extract Language to lang files

Laravel | package | languages | translation

Laravel Extract Language to lang files

If you've already used JSON lang in your views, here's a handy package to extract all lang...

David Carr

1 min read -

I'm writing a new Laravel book on testing called Laravel Testing Cookbook

Laravel | Testing | pestphp | PHPUnit | books

I'm writing a new Laravel book on testing called Laravel Testing Cookbook

Laravel Testing Cookbook will cover common use cases. Sign up for the waitlist to be notif...

David Carr

1 min read -

Adding pinned posts with Laravel

Laravel | posts | pinned

Adding pinned posts with Laravel

Let's say you have a blog and have posts ordered by their published date. Later you decide...

David Carr

2 min read -

Upload images in Ckeditor 5 with Laravel

CKEditor | Laravel

Upload images in Ckeditor 5 with Laravel

Base64 upload adapter Simple image adapter CKeditor 5 out-of-the-box does not come with...

David Carr

3 min read -

Running Docker on M1 Mac - docker: compose is not a docker

M1 Mac | Laravel | Docker | sail

Running Docker on M1 Mac - docker: compose is not a docker

When upgrading from an Intel mac to an Apple Silicone I noticed docker fails to run. I'm u...

David Carr

1 min read -

Using Laravel Sail alongside PhpStorm

sail | Laravel | Docker | PhpStorm

Using Laravel Sail alongside PhpStorm

Packages Laravel Framework I'm trying out Laravel Sail for my local development, this post...

David Carr

2 min read -

Handle Stripe checkout webhooks

Stripe Checkout | Laravel

Handle Stripe checkout webhooks

Laravel Framework Stripe API Continuing on from my last post Sell products with Stripe let...

David Carr

2 min read -

Laravel update factory after creation

factories | Laravel

Laravel update factory after creation

Using a Laravel factory to create a user and then update a relationship directly is possib...

David Carr

1 min read -

Laravel use multiple boot in traits

traits | Boot | Laravel

Laravel use multiple boot in traits

Let's say you want to use multiple traits in your models to reuse common code such as appl...

David Carr

2 min read -

Laravel how to test CSV download

Laravel | Testing

Laravel how to test CSV download

When you have a CSV generated how do you test it runs. Take this extract: public function...

David Carr

2 min read -

Next Page

Copyright © 2024 DC Blog - All rights reserved.