Posts tagged with laravel
Selling digital products using Laravel part 1: Intro + a tour of spatie.be original
On our Laravel powered company website we sell digital products: video courses, e-books, and software packages. Behind the scenes we use Laravel, Paddle, Vimeo, the GitHub API and a couple of other things.
We've open-sourced our site. You'll find the actual code we have deployed in the spatie-be repo on GitHub. In this blog post, I'll guide you through the code.
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.
"Freek’s newsletter is one of the best ways to stay updated with the Laravel and PHP ecosystem. It consistently highlights useful packages, tools, and ideas from the community, especially the amazing work coming from Spatie. As a Laravel developer building SaaS and web platforms, I find it extremely helpful to discover practical tools and insights that improve my development workflow."
Selling digital products using Laravel part 5: Using Satis to install private packages original
Some of our products, like Mailcoach and Media Library Pro, are PHP packages for which people can buy a time-limited license. Of course, we want customers to be able to install our paid packages using Composer. Our paid packages are not registered on Packagist, because Packagist is meant to be used for free packages, and there's no way to handle licenses. Let's take a look at how we can solve this using Satis.
Gracefully deprecating foreign keys for a polymorphic relationship
– timacdonald.me - submitted by Tim Mac
Here's how to handle moving from a classic foreign key constrained relationship, to a polymorphic relationship in Eloquent, without impacting the end user.
Read more [timacdonald.me]
The complete guide to Laravel front-end scaffolding
There are many things you can use for front-end scaffolding in Laravel. That can make picking one tough. This blogposts walks you through all the options
Read more [samuelstancl.me]
Running Laravel on the DigitalOcean App Platform
– atymic.dev - submitted by atymic
Here's a deep dive into running Laravel on DigitalOcean's new PAAS offering.
Read more [atymic.dev]
Billing access to your Laravel apps with Gumroad
Miguel Piedrafita explains how you can let Gumroad and Laravel be friends
Read more [miguelpiedrafita.com]
Creating a "Marked as Completed" button using Livewire original
In this video, which is part of the Laravel Package Training, I show you how the "Marked as Completed" button under each video works.
Laravel Worldwide Meetup #3: Yaz Jallad & Adel Fayzrakhmanov original
Here is the recording of Laravel Worldwide Meetup #3. Jazz Jalled spoke on the manager pattern, Adel Fayzrakhmanov on PhpStorm plugin development.
Typing your frontend from the backend
My colleague Ruben introduces the laravel-typescript-transformer package he created. This one can convert backend classes, like enums and DTOs, to TypeScript definitions.
Read more [rubenvanassche.com]
Why and how you should monitor scheduled tasks original
Oh Dear is the monitoring SaaS that my buddy Mattias and I are running. As you might suspect, our service can monitor the uptime of sites and SSL certificates' health. What sets Oh Dear apart from the competition is that it can also monitor performance and detect broken links and mixed content on any of the pages of your site.
Today, we added a new type of monitoring: scheduled tasks monitoring. Oh Dear can now notify you whenever one of your scheduled tasks has not run or is running too late.
You can get started monitoring your schedule today. We have a free ten-day trial. And when using this coupon code, you'll get 30% off on the first three months when subscribing: MONITOR-ALL-THE-THINGS.
In this blog post, I'd like to introduce how you can use scheduled task monitoring in Oh Dear, and how it works under the hood. There were a lot of interesting challenges we had to solve. I hope you're ready to dig it.
Moving 27K unique images from Spatie medialibrary local to s3 storage using Laravel Queue
On his blog, Robin Dirksen shares how he migrated the files of his app to S3
Read more [robindirksen.nl]
How to call an overridden trait function original
Traits are a wonderful thing in PHP. You can use them to reduce code duplication by putting common functions in a trait and apply them to all classes where those functions are needed. I also sometimes use traits to break up a large function in multiple single-use traits.
In this post, I'd like to show you how you can override a trait function and call it from the overriding function.
Nested States in Laravel 8 Database Factories
– stefanzweifel.io - submitted by Stefan Zweifel
A quick intro on how to use states for "nested" Database Factories. The examples covers the Models created by laravel/cashier-paddle package.
Read more [stefanzweifel.io]
Automating the Laravel 8 schema dump using GitHub Actions
– fidum.uk
Dan Manson explains how you can run that shiny new schema:dump command on GitHub actions. Pretty cool
Read more [fidum.uk]
Unconventional Laravel: Custom Pipeline Classes
– ryangjchandler.co.uk - submitted by Ryan Chandler
Laravel makes use of the internal Pipeline class and it's more common in userland too, but have you ever considered tidying up these pipeline processes with custom pipeline classes?
Read more [ryangjchandler.co.uk]
Gracefully Switching Queue Drivers in a Laravel app
In this post Mohamed Said shared the possible ways to switch between drivers.
Read more [divinglaravel.com]
Working with data in a larger-than-average Laravel app
In this example chapter taken from the Laravel Beyond CRUD course, Brent explains a good strategy to handle data
Read more [laravel-beyond-crud.com]
Faking Laravel's current date in Cypress end-to-end tests
– johnbraun.blog - submitted by John Braun
When writing an end-to-end test, it is tricky to force the application to use a certain (fake) date. In this post, John Braun shares his approach using a custom middleware to be able to write Cypress tests while your application state uses a specific (fake) date.
Read more [johnbraun.blog]
Supporting and testing using multiple Laravel and PHP versions
In this video you'll learn how add support for multiple PHP and Laravel versions, and how to run the tests against all combinations of Laravel and PHP.
Read more [spatie.be]