Sevalla is the all-in-one PaaS for your web projects. Host and deploy your applications, databases, object storage, and static sites. Enjoy advanced deployment pipelines, a complete database studio, instant preview apps, and one-click templates. The pricing is simple: no hidden fees, no seat-based pricing, and you pay only for what you use. Get real human support from developers.

Get started now with a $50 credit at Sevalla.com.

10 Lodash Features You Can Replace with ES6

Link –

In the JavaScript world Lodash is a pretty popular and awesome package with lots of handy array, collection and object methods. In this article Dan Prince explains that some of those methods do have a nice ES6 equivalent.

Lodash is the most depended on npm package right now, but if you’re using ES6, you might not actually need it. In this article, we’re going to look at using native collection methods with arrow functions and other new ES6 features to help us cut corners around many popular use cases.

https://www.sitepoint.com/lodash-features-replace-es6/

Read more

Stay up to date with all things Laravel, PHP, and JavaScript.

You can follow me on these platforms:

On all these platforms, regularly share programming tips, and what I myself have learned in ongoing projects.

Every month I send out a newsletter containing lots of interesting stuff for the modern PHP developer.

Expect quick tips & tricks, interesting tutorials, opinions and packages. Because I work with Laravel every day there is an emphasis on that framework.

Rest assured that I will only use your email address to send you the newsletter and will not use it for any other purposes.

How agencies & freelancers should do web hosting

Link –

Andrew Welch of the New York based agency nystudio107 wrote a good overview of the options agencies & freelancers have regarding hosting.

Web hosting is something that many agencies and freelancers don’t give a whole lot of thought to. They just use whomever they’ve had a long-standing relationship with, and call it a day.

However, choosing the right host—and the right type of host—can be crucial to the success of a project. And the hosting world has changed a whole lot in the past few years, so let’s dive in.

https://nystudio107.com/blog/web-hosting-for-agencies-freelancers

At my company Spatie we're pretty happy with our choice to hosts our client projects on VPSes. We provision them using Laravel Forge and some custom ansible scripts.

Read more

An easy way to validate front end forms using back end logic

Original – by Freek Van der Herten – 2 minute read

Imagine you're building an single page application that has a couple of forms. How are you going to validate those forms? Because we don't want to refresh the page submitting the form as usual isn't possible. Adding validation logic to the JavaScript side of things would just duplicate the…

Read more

An Animated Intro to RxJS

Link –

On css-tricks David Khourshid wrote a good introduction to RxJS.

According to ReactiveX.io: "ReactiveX is a library for composing asynchronous and event-based programs by using observable sequences."

That's a lot to digest in a single sentence. In this article, we're going to take a different approach to learning about RxJS (the JavaScript implementation of ReactiveX) and Observables, by creating reactive animations.

https://css-tricks.com/animated-intro-rxjs/

If you want to toy around with the same ideas in PHP check out RxPHP

Read more

How I Got From 0 to 1 000 Stars on GitHub in Three Months With My Open Source Side Project

Link –

Ondřej Mirtes, author of PHPStan lists some great tips to make a side project succesful.

Most developers have side projects. That's how we try out new things or make something that we miss on the market or in our dev stack. But most side projects end up unfinished and never actually see the light of day. And even if a developer builds up the courage to show his work to the public, he quickly finds out that just publishing a repository doesn't actually bring the masses to his doorstep. ... In this article, I'd like to share with you what I did to make sure that the project doesn't end up in the dustbin of history. I will concentrate on open source software, but the following advice may as well apply to any creative endeavour.

https://medium.com/@ondrejmirtes/how-i-got-from-0-to-1-000-stars-on-github-in-three-months-with-my-open-source-side-project-8ffe4725146#.211n6vihd

Read more

Why I'm frequently absent from open source

Link –

James Long gives some solid advice: always keep in mind that there are a lot of things that are more important than coding.

The goal of free open source development is empowerment: everyone can not only use code for free but also contribute to and influence it. This model allows people to teach and learn from each other, improves businesses by sharing work on similar ideas, and has given some people the chance to break out and become well-known leaders.

Unfortunately, in reality open source development is rife with problems and is ultimately unsustainable. Somebody has to pay the cost of maintaining a project.

http://jlongster.com/Why-Frequently-Absent-Open-Source

Read more

Symfony Routing performance considerations

Link –

On his blog Frank De Jonge explains how he solved a performance problem in one of his projects.

Last week I took a deep dive into Symfony's Routing Component. A project I worked on suffered from a huge performance penalty caused by a routing mistake. This lead me on the path to discovering some interesting performance considerations. Some common practices align nicely with Symfony's optimisations, let's look into those.

https://blog.frankdejonge.nl/symfony-routing-performance-considerations/

Read more

An easy to use server monitor written in PHP

Original – by Freek Van der Herten – 12 minute read

We all dream of servers that need no maintenance at all. But unfortunately in reality this is not the case. Disks can get full, processes can crash, the server can run out of memory... Last week our team released a server monitor package written in PHP that keeps an eye on the health of all your…

Read more

Shipping Docker, a video tutorial series on Docker

Link –

Chris Fidao, the hero behind serversforhackers.com, and Deploy PHP!, created a new video course called Shipping Docker. It's in early access right now and it covers everything from the basics to advanced topics like building a multi-server production environment.

I'm only a couple of videos deep in the course, and like expected, I'm liking a lot of what I'm seeing.

This is a comprehensive course in the many uses of Docker. From playing to developing, testing to deploying, we'll cover it all in a way that is easy to understand.

https://shippingdocker.com/

(In case you were wondering, I'm not being paid for posting this)

Read more

Our postcard collection

Original – by Freek Van der Herten – 1 minute read

All our packages are MIT-licensed. But if you use our stuff and want to make us happy, we highly appreciate a postcard from your hometown. This suggestion is mentioned in all readme's of our packages We've been asking for postcards for quite some time now and have built up a nice collection. Today,…

Read more

Non-breaking, SEO Friendly Url's in Laravel

Link –

Sebastian De Deyne, author of many Spatie packages, posted a new blog article on how to generate SEO Friendly Urls in Laravel.

When admins create or update an news item—or any other entity—in our homegrown CMS, a url slug is generated based on it's title. The downside here is that when the title changes, the old url would break. On the other hand, if we wouldn't regenerate the url on updates, titles that were edited later on would still have an old slug in the url, which isn't an ideal situation either.

https://sebastiandedeyne.com/posts/2017/non-breaking-seo-friendly-urls-in-laravel

Read more

How to organize a meetup

Link –

On his blog Jef Claes, organiser of DDDBE, shares some good tips on how to organize a meetup.

I've organized a few DDDBE meetups in the past, and always succeed in forgetting something. Either someone points it out well in advance, or I end up stressing last minute. This post partly serves as a checklist for myself, but it would be a welcome side effect to also see it encourage others to help out organizing future meetups. Organizing a meetup is not rocket science, having a list of what to take care of is a good start.

http://www.jefclaes.be/2017/02/how-to-organize-meetup.html

Read more

Glossary of Modern JavaScript Concepts

Link –

Don't know what the difference between stateful and stateless is, or what higher order functions are? On the auth0.com site Sebastián Peyrott explains these terms and other modern JavaScript concepts.

Modern JavaScript has experienced massive proliferation over recent years and shows no signs of slowing. Numerous concepts appearing in JS blogs and documentation are still unfamiliar to many front-end developers. In this post series, we'll learn intermediate and advanced concepts in the current front-end programming landscape and explore how they apply to modern JavaScript.

https://auth0.com/blog/glossary-of-modern-javascript-concepts/

Read more

A Laravel package to impersonate users

Link –

A great feature of Laravel Spark is it's ability to impersonate other users. As an admin you can view all screens as if you are logged in as another user. This allows you to easily spot a problem that your user might be reporting. Laravel-impersonate is a package, made by MarceauKa and Thibault Chazottes that can add this behaviour to any Laravel app.

Here are some code examples taken from the readme.

Auth::user()->impersonate($otherUser); // You're now logged as the $otherUser.

Auth::user()->leaveImpersonation(); // You're now logged as your original user.

$manager = app('impersonate');

// Find an user by its ID
$manager->findUserById($id);

// TRUE if your are impersonating an user.
$manager->isImpersonating();

// Impersonate an user. Pass the original user and the user you want to impersonate
$manager->take($from, $to);

// Leave current impersonation
$manager->leave();

// Get the impersonator ID
$manager->getImpersonatorId();

It even includes some handy blade directives:

@canImpersonate
    <a href="{{ route('impersonate', $user->id) }}">Impersonate this user</a>
@endCanImpersonate

@impersonating
    <a href="{{ route('impersonate.leave') }}">Leave impersonation</a>
@endImpersonating

Want to know more, take a look at the package on GitHub.

Read more

Laravel's tap helper function explained

Original – by Freek Van der Herten – 2 minute read

A little known helper function, called tap was added to Laravel 5.3. In this short post I'll explain how this function can be used. Let's first take a look at the tap function itself. It's actually a very short one. function tap($value, $callback) { $callback($value); return $value; } So you give it…

Read more

Environment variables, config caching, and Laravel

Link –

In a short blogpost Michael Dyrynda gives some good advice on why you should cache your routes and config values.

As part of the recommended production deploy process it is important to run the caching commands that Laravel affords us via Artisan. This means running config:cache and route:cache, which will compile the config and route files down into a single file each.

In doing so, Laravel aims to speed up parsing of these files by only needing to read a single, rather than multiple files.

https://dyrynda.com.au/blog/environment-variables-config-caching-and-laravel

Read more

Getting started with Varnish Cache

Link –

If you want to learn Varnish Thijs Feryn wrote a book for you. It's free to download until 7th March 2017.

Getting Strated with Varnish Cache is a technical book about the Varnish caching technology. Varnish is a so-called reverse caching proxy that acts as an intermediary between the browser and the webserver. Varnish stores HTTP responses and serves them to the browser, without accessing the backend for every request. This causes a massive speed increase.

https://blog.feryn.eu/my-varnish-book-is-now-available/

Read more