Vapor: are you using the right database?

Laravel Vapor is amazing.

But despite all its nice bells and whistles, human error can always find its way in.

On one of my projects, I mixed up some environment settings and connected to the wrong database. Ouch! Seems I’m not a robot after all.

Luckily, I was only overwriting old dummy data…

Nevertheless, I wrote a little command that helps me prevent this from happening again. It’s a simple check I’ve now added as the first build step on each Vapor deployment:

deploy:
    - 'php artisan ensure:database:is staging'
    - '<other deploy steps here...>'

Here is the command, enjoy!

(Header photo by Jan Antonin Kolar)

🚀 Now available: Laravel Spark for Mollie

Laravel Spark Mollie edition

You can now use the Mollie edition of Laravel Spark as a starting point for your next Big Idea.

Powered by Mollie’s payment platform, this Spark edition is perfectly suited for the European market.

Europeans and their very very odd behaviour…

My US friends find this super weird, but we Europeans tend to favour our local payment methods such as iDEAL and Bancontact over PayPal or creditcard. Our online payment systems seem to be wired differently. I’m told our brains are too (really?!).

Anyway, if you’d like some European customers for your SAAS app you’ll need to support these trusted payment methods.

On top of all these strangely sounding payment methods (Belfius or SOFORT anyone?), you want to keep your non-European customer base as well. So you’ll need creditcard and PayPal support too.

And that’s where Mollie shines. They’re offering a single checkout for all of these payment methods. Starting today these shiny features are available in a dedicated Mollie edition of Laravel Spark.

Getting started

If you’re holding a recent Spark license, you can now choose between the Stripe edition and the Mollie edition.

Installing Spark for Mollie is simple, and takes only a few extra steps when you’re using it the first time:

  1. Make sure you have a recent Spark license. That means you can install the default Spark edition version 6 and up (a.k.a. “Spark Aurelius”).
  2. Visit your GitHub settings page at spark.laravel.com. Connect your GitHub account if necessary.
  3. Spark for Mollie is kept in a separate repository. Click “Join repository” to get access.
  4. Follow the installation instructions in the repository’s readme.

You can find Spark’s general features in the Spark documentation page.

I really hope you’re all going to enjoy it. I built it because I needed it for my own projects.

And when your own Spark Mollie baby goes live, feel free to share the link with me so we all can share your joy, sit in awe and marvel at your work.

2018 – The year I declined a CTO position and tried not to get shot

What. A. Year. 2018.

Well, what an eighteen months actually – this post will not make any sense cut short.

Let’s start with…

My personal life

During the second half of 2017 my girlfriend and I sold our house in Breda, The Netherlands, while the photographer was still taking the pictures.

And moved to Burgundy, France.

Continue reading “2018 – The year I declined a CTO position and tried not to get shot”

Available now: Laravel package development from scratch

Since I found out how to create Laravel packages I was hooked.

Organizing your code in packages really declutters your application code while providing the added benefit of true reusability. It has made my applications a lot easier to maintain.

Learning to develop packages doesn’t have to be hard. If you know how to create a basic Laravel app, you can write packages as well.

Continue reading “Available now: Laravel package development from scratch”

A trait for testing laracasts/flash

Flash message

The Laracasts/flash package is an amazing solution to send Bootstrap 3 styled flash messages to the user’s screen.

After you have set it up, you can do something like this in your controller:

public function store()

{

    flash('Welcome Aboard!');

    return home();

}

And you get a flash message looking like this:

Example flash message
Notice the green bar here

But how do you test the flash message was actually sent using phpunit? Continue reading “A trait for testing laracasts/flash”

Easy Mollie payments with Laravel

In the previous post you learned that Cashier is not always the best fit for payment processing in Laravel. And if that’s the case you will need to integrate payment processing manually into your application.

Personally I have been integrating the Mollie gateway into Laravel projects targeting a Dutch customer base. This way it is possible to accept iDeal payments – which is the preferred method of my customers. Continue reading “Easy Mollie payments with Laravel”