Creating a Laravel specific package
John Braun wrote a good series on how to get started with Laravel package development
Read more [johnbraun.blog]
John Braun wrote a good series on how to get started with Laravel package development
Read more [johnbraun.blog]
Liam Hammett created a cool package to easily create Blade Helpers in Laravel.
I put together a package that attempts to help make these helper functions that little bit easier to define without the boilerplate of returning the string or having to consider what an expression may be when creating a Blade directive.
Read more [liamhammett.com]
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."
Imagine you're building that your app can notify your user, but you don't want to send more than one notification in a timeframe of five seconds. How are you going to test the time aspect? Do you have to create a test that takes five minutes?
When a request comes in your app will return a response. To create that response, your application has to do some work. Most likely queries will execute. This all takes some time. Wouldn't it be nice if the same request comes in, we can return the response the application has constructed previously?
In a new post at the madewithlove blog, Geoffrey Dhuyvetters explains how you can organize your code so a bundler can make it as small as possible.
As an author of (open source) packages, I think you have the responsibility to protect the bundle size of your package consumer. When you publish a package that exports a whole range of modules (for example lodash, ramda, date-fns…) you want to make sure the package is exported in such a way that the consumer of your package (mostly bundlers) can optimize size.
Read more [madewithlove.be]
For the past few years, we've been using the laracasts/flash package to flash messages in all projects. In case you don't know: a flash message is a message that is being passed from a request to only the next request. The Laracasts package does its job pretty well. It has support for multiple flash messages, overlay messages. It comes with bootstrap styling out of the box and a few messaging levels preconfigured.
We've noticed that in our projects we only use a tiny bit of functionality from the laracasts/flash. That's why we whipped up our own lightweight package called spatie/laravel-flash. In this blog post, I'd like to introduce it to you.
One of the good things that GDPR brought us was the right to data portability. Shortly put, this means that an app should be able to export all data that it has for a user.
Because we have multiple apps at Spatie that need to create such an export, we decided to extract our solution to a package called laravel-personal-data-export. In this blog post, I'd like to introduce the package to you.
Recently we released a new package called enum. In a new post on his blog Brent tells you what the benefit of working with enums is and how our package differs from the alternatives.
Today I want to explore some of the difficulties we encounter when solving problems like enums in userland. I'll talk about my personal take on enums, and we'll ponder on core support.
Read more [stitcher.io]
Marcel Pociot recently released another awesome package: laravel-mailbox. In a new post on his blog he guides us through the code.
Read more [marcelpociot.de]
Caleb Porzio created a new Laravel package with a couple of very usefull functions.
I packaged up all the helper functions I use in my projects. They are cool. You can install it by running composer require calebporzio/awesome-helpers.
Read more [calebporzio.com]
Christopher Pitt has created a new package called phpx that bring the power of LiveView to PHP.
A few days ago, Caleb Porzio demonstrated some work he’s been doing; to replicate Phoenix LiveView in Laravel. I’ve been building PHP preprocessor stuff for a long time, and this really inspired me to try the same thing.
Read more [assertchris.io]
laravel-websockets is a Laravel package that can handle the server side of WebSockets entirely. It completely replaces the need for a service like Pusher or a JavaScript-based laravel-echo-server. It has extensive documentation and a demo application you can play with. Marcel, developer and co-owner…
Caleb Porzio, developer at Tighten Co, recorded a video that explains how to publish a Vue component as a package
If you're like me, you have a handful of useful Vue components you use between different projects. Many times I've wanted to publish an individual Vue component to NPM for myself and others to access more easily.
Read more [calebporzio.com]
#laravel package creators: did you know you can just register your own factories?https://t.co/EHwIoE1VTm pic.twitter.com/zevHhaVh2c
— Freek Van der Herten (@freekmurze) 11 oktober 2018
Tip nr.2 for package creators: you can just use Schema to create tables for your tests.https://t.co/2VO0o2jfiG pic.twitter.com/nXUf7mjxRU
— Freek Van der Herten (@freekmurze) 11 oktober 2018
And another tip: need to use a sqlite in memory db in your orchestra tests? Just set the db connection tot testing in your phpunit config.https://t.co/POtg2N2M4e pic.twitter.com/yE2jtD7CoP
— Freek Van der Herten (@freekmurze) 11 oktober 2018
Read more [twitter.com]
Patrick Brouwers is doing an awesome job creating a quality Laravel package to integrate with Excel. The newest version can import Excel files.
Laravel Excel 3.0 was released a while ago and completely redesigned the architecture behind exports. Our next target was to do the same paradigm shift for imports. Development took some time, because we wanted to get it right from the start.
Read more [medium.com]
Now that Laravel Nova can be installed via composer, we can run tests for Nova packages and projects on Travis CI. My friend Marcel Pociot explains how.
This is great news, as this does not only simplify updating Laravel Nova, but it also allows Nova tools/package developers to add continuous integration to their projects! But there is still a problem: we do not want to provide our Laravel Nova credentials in our open source repository. But how can we solve this?
Read more [marcelpociot.de]
TJ Miller shares a cool Travis config to tests against all versions of Laravel.
As Laravel 5.7 is now out, I needed to add support to both the package’s composer configuration and verification in CI. Previously, I only needed to verify against 5.5 and 5.6 I thought that having --prefer-lowest in the matrix would add the coverage I needed. Now that I am supporting three versions I felt that I needed a more specific way of verifying compatibility with different versions of Laravel.
Read more [blog.tjmiller.me]
A while ago I ditched the custom admin of this blog in favour of Laravel Nova. As you might have noticed every blog post on murze.be has some tags. Nova ships with many form fields but a field to use tags is not included out of the box. That's why I created my own tags field and released it as…
Marcel Pociot created another great package. laravel-dump-server will transmit all output of dump calls to another port on your system. This will avoid cluttering up the responses of your app with debug output. Here's a gif taken from the readme of the package:
https://github.com/beyondcode/laravel-dump-server
The last few months I've been working on a package called laravel-event-projector. This package aims to be a simple and very pragmatic way to get started with event sourcing in Laravel. Ahead of it's release, which will happen in a few days, I've recorded a small video introduction. You can find the…