certificatechain.io: an online tool to download intermediate ssl certificates

When installing an SSL certificate on your server you should install all intermediate certificates as well. If you fail to do so, some browsers will reported “untrusted” warnings for your site like this one.

untrusted

Searching and downloading those intermediate certificates can be a hassle.

Today my colleagues at Spatie and I launched certificatechain.io. This online tool helps you download all intermediate certificates. Just paste or upload your certificate and you'll get a file containing the entire trust chain that you can install on your server.

The site is built with Laravel 5 and uses the SSL certificate chain resolver we made last month.

Read more

The missing tail command for Laravel 5 original

by Freek Van der Herten – 1 minute read

Last week Laravel 5 was released. Unfortunately that handy command for tailing the logs that you know and love from Laravel 4 was not included. The laravel-tail package brings it back. You can install it via composer: composer require spatie/laravel-tail After that you'll have to register the…

Read more

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.

Everything new in Laravel 5

Back in September Taylor Otwell said that Laravel 4.3 would be renamed to Laravel 5 to reflect a directory change and “other interesting initiatives”. Since that announcement the excitement for Laravel 5 has been building and “other interesting initiatives” turned into almost two dozen new features to help developers be more productive.
Eric Barnes made a nice list of the most notable new goodies in Laravel 5. The shiny new version of the framework will be released next week.

Read more

An SSL certificate chain resolver original

by Freek Van der Herten – 1 minute read

When installing an SSL certificate on your server you should install all intermediate certificates as well. If you fail to do so, some browsers will reported "untrusted" warnings for your site like this one: Searching and downloading those intermediate certificates can be a hassle. It…

Read more

Higher order programming

This weekend at the PHPBenelux 2015 conference I went to a session about higher order programming by Mathias Verraes. Higher-order programming is a style of programming that uses functions as values.

During the session Mathias demonstrated his Lamdalicious library. This library brings the principles of LISP to PHP. The talk was very fast paced and everything was live coded. PHP was misused to the fullest: global variables, error suppression, ... and there was lots of recursion going on. Basically he was constructing another language in PHP. During the talk there were lots of ooohhss and aaahhhss in the room, so I suspect I was not the only one enjoying it.

If you are intrigued by this, be sure to read his blog post on the subject. The blog post is essentially the written down version of the talk.

You'll never use any of this code in production, but that's not the goal of the library. Like when doing code katas, the train of thought is much more important than the result.

Here's another wonderful blog post.

Read more

Generate image manipulations in a Laravel project

Earlier this month Glide joined The League of Extraordinary Packages. This package provides an easy way to generate image manipulations on the fly. Within a couple of hours I had integrated this wonderful package into both my company's legacy and current CMS.

The current CMS is based on Laravel. The Glide-integration is now available as a package on github: freekmurze/laravel-glide.

Installation

Nothing too fancy, you’ll have to:
  • use composer to pull in the package
  • install a service provider
  • install a facade
  • publish a config file
Read the specifics on Github.

Usage

Assuming you've got an image named `kayaks.jpg` in `app/storage/images` (this directory can be customized in the config file) you can use this code in a blade view:

<img src=&quot;{{ GlideImage::setImagePath('kayaks.jpg')->setConversionParameters(['w'=> 50, 'filt'=>'greyscale']) }}&quot; />

The function will output an URL to a greyscale version of kayaks.jpg that has a width of 50 pixels. As soon as the URL gets hit by your browser, the image will be generated on the fly. The generated image will be saved in app/storage/glide-cache (= the cache directory specified in the input file).

The generated URL will also be signed to prevent jerks from generating unwanted manipulations.

The setConversionParameters-function accepts an array with conversion options. You can take a look at the image API of Glide to see which options are available.

It's also possible to generate an image directly on the server:


GlideImage::setImagePath('kayaks.jpg')
    ->setConversionParameters(['w'=> 50, 'filt'=>'greyscale'])
    ->save($fileWhereImageManipulationMustBeSaved);

Read more

Using Elasticsearch in Laravel original

by Freek Van der Herten – 1 minute read

Elasticsearch is a lightning quick open source search server. It's java-based (but don't let that scare you) and can index and search documents. If you want to know more about it, watch this excellent talk by Ben Corlett. https://www.youtube.com/watch?v=waTWeJeFp4A For a recent Laravel project I had…

Read more