Vancouver PHP's Q&A session with Taylor Otwell
– Edit
The Vancouver PHP user group recently had a Q&A session with Laravel's creator Taylor Otwell.
Cool Nova tidbit revealed in the video: it'll be a package.
– Edit
The Vancouver PHP user group recently had a Q&A session with Laravel's creator Taylor Otwell.
Cool Nova tidbit revealed in the video: it'll be a package.
– Edit
In a new post on his blog Matthieu Napoli, creator of PHP-DI, explains how he made v6 much faster.
But the good thing is that, after 6 years of existence, the project has matured and is now quite stable. The original objectives are met, even though there is of course always room for improvements and innovation. There is room to push the container to be better on other levels. And the most obvious one is performances.
PHP-DI 6 will be much, much faster because it is a compiled container.
http://php-di.org/news/21-php-di-6-compiled-container.html
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 publishes a super resourceful and practical newsletter. A must for anyone in the Laravel space"
– Edit
My colleague Brent has some good thoughts on where to place curly brackets.
Dedicating a whole blogpost to curly brackets might seem like overkill but I believe it's worth thinking about them. Not just because of one curly bracket, but because there's a bigger message in all this. Thinking about how we read and write code not only improves the quality of that code, it also increases our own and others ease of mind when working with it. It can improve the fluency of your work and free your mind to think about real important stuff.
https://www.stitcher.io/blog/where-a-curly-bracket-belongs
– Edit
Cristopher Rumpel recently launched a big redesign of his blog. In a new post he touches on why he moved away from his old solution, and what kind of problems he had to solved. Great read!
One of my resolutions for 2017 was to redesign my blog. One week before the new year I faced myself with the challenge and thought to myself if this was still doable. Somehow I managed it and here it is. In this article I will explain the process and show you how I redesigned the blog with Tailwind CSS and moved it from Jekyll to Laravel with keeping almost the same performance.
https://christoph-rumpel.com/2018/01/how-i-redesigned-my-blog-and-moved-it-from-jekyll-to-laravel
– Edit
On his blog, Sebastian De Deyne, shares a quick tip on how to pass data to a layout in Laravel.
Laravel quick tip! The @extends Blade directive accepts a second (undocumented) parameter to pass data to the parent layout.
https://sebastiandedeyne.com/posts/2018/passing-data-to-layouts-in-blade-through-extends
– Edit
Collin O' Dell, member of the PHP League, shares how he was able to significantly improve the performance his json5 package using Blackfire profiling.
Back in November I released colinodell/json5 - a JSON5 parser for PHP. It's essentially a drop-in replacement for PHP's json_decode() function, but it allows things like comments, trailing commas, and more.
...
I always knew that a PHP-based implementation would be slower than PHP's native C implementation, but execution time measured in minutes was completely unacceptable!
So I fired up Blackfire (which I've previously used to optimize league/commonmark) and got to work.
https://www.colinodell.com/blog/201801/optimizing-colinodelljson5-blackfire
by Freek Van der Herten – 6 minute read – Edit
I'm currently building a webapp named Oh Dear: an easy to use and beautiful website monitor. It has recently gone into it's beta phase. At the moment of writing everybody can register a new account. After you've registered you'll start your trial period of 10 days. Oh Dear is built on top Laravel…
– twitter.com – Edit
Quick @laravelphp tip:
— Marcel Pociot (@marcelpociot) January 6, 2018
Use the "wasRecentlyCreated" model attribute to check if your model was created or found ???? pic.twitter.com/HZwdDyqAw4
Read more [twitter.com]
by Freek Van der Herten – 5 minute read – Edit
Recently we released laravel-cors. This package can add the necessary CORS headers of your Laravel app. In this post I'd like to give a quick explanation of what CORS is and how you can use the package. What is CORS Imagine that all JavaScript code for domain X running in a browser would be able to…
by Freek Van der Herten – 15 minute read – Edit
This post was first published on 24daysindecember.net Chances are that you've never heard of my company Spatie. We specialise in creating Laravel applications for our clients. Our team is rather small: we consist of only 6 developers and one manager. On first glance we are just a web agency like…
– Edit
Martin Hujer shares some pretty good tips for working with Composer.
Although most PHP developers know how to use Composer, not all of them are using it efficiently or in a best possible way. So I decided to summarize things which are important for my everyday workflow.
The philosophy of most of the tips is "Play it safe", which means that if there are more ways how to handle something, I would use the approach which is least error-prone.
https://blog.martinhujer.cz/17-tips-for-using-composer-efficiently/
– Edit
My colleague Brent is currently creating a new package called spatie/async. This one will let you easily do some asynchronous parallel processing in PHP. In a new post on his blog Brent explains why we are creating the package and compares it to a few other solutions out there.
If you're into parallel PHP, you probably heard of Amp and ReactPHP. Our package aims not to compete with those two, as it only solves one tiny aspect of parallelism in PHP. We did however use both the packages to run some benchmarks against. Let's take a look at the results.
https://www.stitcher.io/blog/asynchronous-php
– twitter.com – Edit
???? Sometimes you want quick on-the-fly authorization, without the hassle of registering a policy/callback at the Gate.
— Joseph Silber (@joseph_silber) December 28, 2017
Laravel's HandlesAuthorization trait is perfect for this. Simply call the `deny()` method, and Laravel will respond with a 403 HTTP response ???? pic.twitter.com/O36agH2o3u
Read more [twitter.com]
– twitter.com – Edit
Beautiful, organized results in PHPUnit, where have you been all my life?
— Keith Damiani (@keithdamiani) December 21, 2017
Composer-install this bad boy, add one line to phpunit.xml, and enjoy the view. ????https://t.co/JJi4tEhWWo pic.twitter.com/4pndct3iZk
Read more [twitter.com]
– Edit
Marcel Pociot, author of BotMan, used GitHub and Google BigQuery to look up some interesting numbers about the PHP repos in 2017.
It's this time of the year again - the end of the year is coming up fast, so why not step back and take a look at what we, as a PHP community, have achieved this year?
For these statistics, I used the free GitHub Archive data in combination with Google BigQuery, which lets you process 1TB of data per month free of charge.
So let's take a look at some numbers.
http://marcelpociot.de/blog/2017-12-21-a-php-year-in-review
My team is mentioned in the article too. Pretty proud of this!
As you can see, Spatie - a company doing a ton of open source projects - is on this list 16 times. Well done ???? !
by Freek Van der Herten – 3 minute read – Edit
Laravel has an excellent Collection class that has many useful operations. The class is also macroable. This means that you can add function to it at runtime by calling macro on it and passing a name and a closure. In our projects we tend to code up the same macro's over and over again. That's why…
by Freek Van der Herten – 5 minute read – Edit
laravel-medialibrary is a package that can help handle media in a Laravel application. It can organise your files across multiple filesystems, generate thumbnails, optimize images and much much more. Like mentioned before on this blog my team and I are currently creating a new major version, v7,…
– Edit
In an absolutely fantastic post Caleb Porzio, engineer at Tighten Co., goes through his VS Code setup. He goes over his extensions, key bindings, must-have settings, ...
I’m using VS Code as my primary editor these days and am really digging it. My setup is by no means perfect, but I've made lots of little tweaks along the way that you may benefit from. I've set up these nifty categories, so feel free to jump around and try stuff out as you go, or come back later and use it as a reference.
http://calebporzio.com/my-vs-code-setup-2/
I've made the switch from PhpStorm to VS Code a couple of weeks ago and have been using it ever since. I like the speed improvements over PhpStorm, the zen feel, the xdebug experience, ... It just feels lighter (and I mean that in a good way) compared to PhpStorm.
If you want to give VS Code a shot too, go watch the free Visual Studio Code for PHP developers course on Laracasts.
by Freek Van der Herten – 4 minute read – Edit
laravel-medialibrary is a powerhouse package that can help handle media in a Laravel application. It can organise your files across multiple filesystems, generate thumbnails, optimize images and much much more. My team and I are hard at work creating a new major version, v7, that adds a lot of…
– Edit
PHP 7.2 was released last week. Here's a nice post highlighting the most important changes. If you want to know how to install PHP 7.2 on your system, Colin O' Dell has got you covered.
PHP 7.2 has been released, bringing some great new features and security enhancements to the language such as object type hints, saner count() behavior, and much more. Here's a brief guide on how to install PHP 7.2 on several different operating systems.
https://www.colinodell.com/blog/201711/installing-php-72
Using brew on MacOS it's very easy to upgrade from PHP 7.1 to PHP 7.2. Just run these:
brew update
brew upgrade
brew unlink php71
brew install php72
Please be aware that, at the moment of writing, there isn't a stable xdebug version that works for PHP 7.2. Keep an eye on the xdebug homepage to know when a stable version drops.