Posts tagged with spatie

A Laravel package to flash messages original

by Freek Van der Herten – 3 minute read

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.

Read more

A package to create personal data exports original

by Freek Van der Herten – 4 minute read

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.

Read more

Join 9,000+ developers

Every month, I share practical tips, tutorials, and behind-the-scenes insights from maintaining 300+ open source packages.

No spam. Unsubscribe anytime. You can also follow me on X.

A package to handle enums

stitcher.io

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]

A package to use Artisan Tinker in your browser original

by Freek Van der Herten – 2 minute read

Laravel comes with a very handy tinker command out of the box. Unfortunately running multiple lines of code on the command line, or editing the code you just executed, can be a bit bothersome. That's why we created a new package called laravel-web-tinker that allows you to run arbitrary code in your…

Read more

laravel-backup v6 has been released original

by Freek Van der Herten – 4 minute read

laravel-backup is a Laravel package that can backup your application. It can create a zip containing a dump of your database together with other files that you can select. Using the power of Laravel's filesystem abstraction this zip can than be uploaded to one or more remote filesystems. The package…

Read more

Preventing spam submitted through forms original

by Freek Van der Herten – 2 minute read

When adding a form to a public site, there's a risk that spam bots will try to submit it with fake values. We recently released a new package, called laravel-honeypot, that can detect these spammy requests. How honeypots work The majority of spam bots are pretty dumb. You can thwart most of them by…

Read more

A recap of 2018 original

by Freek Van der Herten – 9 minute read

Now that 2018 is coming to a close, a lot of awesome people have written a recap post. Here's mine! The most significant change on a personal level is that my girlfriend an I bought a house in Ghent. Together with our two kids, we moved this summer, and we now live in an awesome house that's very…

Read more

How to backup your app and database to Google Drive

medium.com

Dennis Smink wrote a nice post on how you can use our backup package to backup your application to Google Drive. He includes all steps necessary to authenticate with Google Drive.

Backups are important, period. You will be needing these once your server or server provider suddenly dies. In this tutorial I will cover how to setup Google Drive backup, with Spatie’s backup package, Googles Flysystem and Laravel.

Read more [medium.com]

Highlighting code blocks with league/commonmark

sebastiandedeyne.com

My colleague Seb wrote a cool package that adds tags and classes to code blocks in html, so they can be highlighted with css.

I created a spatie/commonmark-highlighter package that supports higlighting with CommonMark. After you register two custom renderers, all code blocks will receive a set of tags and classes, so they're already prepped to be highlighted by CSS when your content arrives in the browser.

Read more [sebastiandedeyne.com]

? Four years of murze.be ?

4 years ago I started this blog as a tool to share interesting blogposts I found around the web. On each anniversary of my blog I published some interesting stats on the blog. This year is no different.

Between November 2017 and november 2018 this blog served 728 243 pages, a good increase compared to the 591 113 pageview from the previous period. There are 1 217 published posts, of which 195 I've written myself. The others ones are links to other blogs.

Last year in November I moved this blog from WordPress to a custom made Laravel app. A few months ago I removed the handcrafted admin section in favor of Laravel Nova. I'm really glad that I now have full control over my blog and not tied to WordPress anymore. I also opensourced the Laravel app. You can find the source code in this repo on GitHub.

These were the ten most visited posts of the past 12 months:

  1. My current setup (2018 edition)
  2. How to upgrade from PHP 7.1 to 7.2 on MacOS
  3. Introducing our Nova packages
  4. Handling CORS in a Laravel application
  5. laravel-medialibrary v7 has been released
  6. Breaking Laravel's firstOrCreate using race conditions
  7. When empty is not empty
  8. Doing less
  9. A better way to register routes in Laravel
  10. Using Content Security Policy headers in a Laravel app

I do hope you still enjoy reading this blog!

Read more

Making Nova fields translatable original

by Freek Van der Herten – 5 minute read

Laravel Nova is cool package to quickly create admin interfaces in a Laravel app. Unfortunately there's no support for multiple locales out of the box. A while ago we published a package called nova-translatable that makes any of the built in field types translatable. Using the package In order to…

Read more

Our packages have been downloaded 20 million times original

by Freek Van der Herten – 3 minute read

At Spatie we do a lot of open source work. You can find a list of our packages on the open source section of our website. I'm proud to share that, according to Packagist, the Spatie packages have now been downloaded over 20 million times. The rate at which they are being downloaded is growing too.…

Read more

Laravel domains

stitcher.io

My colleague Brent shares how we've been structuring our non-trivial projects at Spatie.

In this post we'll look at a different approach of structuring large code bases into separate domains. The name "domain" is derived from the popular paradigm DDD, or also: domain driven design.

Read more [stitcher.io]

Use custom html components in your Blade views original

by Freek Van der Herten – 7 minute read

Today we launched our newest package called BladeX. In short this package provides you with an easy html like way to render custom html components in your Blade views. In this blogpost I'd like to introduce the package to you. A first example When building a server rendered app you're probably going…

Read more

Introducing BladeX View Models original

by Freek Van der Herten – 3 minute read

Earlier today we released BladeX, a package that allows you to use Blade components using a Vue inspired syntax. Read all about it in my previous blogpost. In the latest North Meets South podcast Jacob and Michael discussed BladeX and wondered if the package could be married with view models or…

Read more

A tags field for Nova apps original

by Freek Van der Herten – 4 minute read

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…

Read more