As I am currently writing documentation for Invoker, I noticed something that was lacking on our Beyond Code website. All documentation pages were missing a search option. Now I could've chosen Algolia for this, or possibly even try and implement a fulltext search on MySQL myself. But instead I decided to go with MeiliSearch. A "Lightning Fast, Ultra Relevant, and Typo-Tolerant Search Engine". It also has support for Laravel Scout, which is pretty nice. Even though we're not going to use it on our own website.
Just like last year, I want to write a recap blog post about all the things that happened for me in 2020. I mean there has been the obvious one, which is Corona - but on a personal note, my family and I luckily stayed healthy throughout the year, which I'm very thankful for.
I haven't really touched my Macbook for the last couple of days, which is quite unusual for me, as my biggest hobbie is also my job - but the last couple of days were quite relaxing, so I'm a bit late to the "recap blog post" party.
PHP 8 - try out all new features #
PHP 8 is already in it's release candidate stage, with RC 3 being released on October 29th, and the general availability release targeted for November 26th. So it is time to take a look at all the new and upcoming features of PHP 8. You can take a look at PHP 8's release schedule here.
UPDATE: Free video course If you're more of a visual learner, check out my entirely free video course, covering all new features in PHP 8.
Every feature that you see in this blogpost comes with an interactive embedded editor, where you can modify the PHP code and evaluate the results yourself.
The official upgrade guide can be found on GitHub.
Announcing Forge CLI #
Today I'm happy to tag version 1.0 of Forge CLI - our latest open source package.
So, yeah - Forge CLI is a CLI tool to interact with your Laravel Forge provisioned server and site. But it works different compared with all the other available tools out there. Let me show you what I mean.
Almost exactly one year ago I was sitting down with Sebastian to have lunch, where we discussed new Beyond Code product ideas. Up until that point we have already launched two successful video course:
- Build A Chatbot - a video course about how to create your own PHP based chatbots
- PHP Package Development - a video course about how to write and structure your PHP applications in packages
Introducing Laravel Playground #
I'm super excited to finally reveal a project that I have been working on for a couple of months already. The overall development was pretty time consuming and it involves a lot of interesting challenges to make this work - but I feel like it's finally in a state that I feel good about sharing with others.
Say hello to Laravel Playground:
What is Laravel Playground? #
Laravel Playground is a sandbox for your Laravel code and the spiritual successor of Tinkerwell Web. Laravel Playground makes it easy to quickly tinker with any PHP and Laravel code right in your browser. You can embed it into your blog, documentation or website easily!
While the code for Tinkerwell Web was running entirely in your browser, Laravel Playground is running your code on actual servers. This allows you to quickly try out features such as request validation, multiple Laravel routes or even Livewire components!
To get started with Laravel Playground, you can go ahead and take a look at this basic example:
In this example, we are creating two Laravel routes that each display a simple view. Try clicking on the link to the other route and you will see that the URL changes and the other view gets loaded.
This embedded Playground is also editable. You can click on the arrow next to the filename to open the file selection. Feel free to modify one of the views or the route definition file. Now press Ctrl+Enter to reload the code - boom you have updated the snippet right in your browser!
If you want to open the playground in a full-screen editor, just click on the "Edit on Laravel Playground" link on the upper right of the embed. This will open up https://laravelplayground.com with your embedded code prefilled. There you have the same ability to edit your code snippet and run your code.
Livewire support #
Laravel Playground comes pre-installed with a hand full of useful Laravel packages. As you can see, the Laravel Debugbar is enabled by default. Another package that you can make use of is Livewire.
Let's take a look at how this works:
As you can see, this playground gives you a ready-to-use Livewire component that you can modify and play with.
When you are on the Laravel Playground website, you can quickly create a new Livewire project (or choose from one of the other available presets) by clicking on the "+" button.
Eloquent models and database support #
Laravel playground also allows you to persist data to a SQLite database within each playground. All migrations that you create will automatically be migrated.
Embedding Playgrounds #
As you can already see in this blog posts, embedding your code is a big feature of Laravel Playground. That's why we made it extremely simple to embed your code - while still maintaining total control of your code on your own website, documentation or blog.
Let's say that you want to include this piece of PHP code in your blog post:
$slice = Str::of('This is my name')->after('This is');
Laravel Playgrounds prefill embeds can now execute this PHP code for you in a sandboxed environment. This means that you keep your code on your website and Laravel Playground executes and renders it for you.
Here's the example code embedded:
<?php $slice = Str::of('This is my name')->after('This is'); dd($slice);
The embed code that makes this work is very developer friendly. You can keep your code wrapped in
<code> blocks on your website and wrap them in a
<div> with attributes that control the embed, like this:
$slice = Str::of('This is my name')->after('This is');
When embedding your code you can configure and customize quite a lot of things, such as the theme, making embeds read-only, which file to open by default, to show or hide the result/code view, etc.
Closing note #
As I said in the beginning of this post: I'm super excited to finally share this with all of you as I've been working on this for a very long time. I hope you like Laravel Playground as much as I do and I can't wait to see it being used in blog-posts all over the place.
If you want to learn more, check out the official documentation on the Beyond Code website.
Introducing Expose – an easy to use tunneling service implemented in pure PHP # Expose is a PHP package that you can use to share your locally accessible websites with a publicly accessible web-server. Expose comes with a free-to-use server out of the box, but you are free to host your own server…
Last week I announced that we at Beyond Code have been working on a pretty cool new app called HELO.
It's a desktop application for Windows, Mac and Linux that will make it super easy to test and debug your application mails during development.
I'm super excited to announce that we are giving away 5 PHP Package Development Pro video courses!
More than 2,000 developers have already taken my course and learned how to build reusable PHP packages. The video course contains more than 30 lessons and covers all topics required for you to start writing your own PHP package. It not only focuses on generic PHP packages but also contains a lot of extra videos that cover Laravel specific PHP package development!
You can enter the giveaway using the form below:
A lot of other people, like my friends Freek, Dries and Nuno have already posted their 2019 recap posts and I'm a bit late to the party, so here goes mine. I've been enjoying the christmas holidays and haven't touched my Macbook for the last 10 days, which was super relaxing for me, as I tend to…
Laravel form requests are one of the most underrated features, maybe even a bit "hidden" inside the Laravel framework. Don't just take my word for granted - here's what Taylor Otwell thinks about it: Truth 👌 https://t.co/dug8Gxi1u6— Taylor Otwell 🏝 (@taylorotwell) October 7,…
Before I start going into any details in this blog post, I want us to have the same definition of the meaning of "simplicity" and "simple" that I am referring to in this article. I have created many online video courses over the last couple of years, have given on-site trainings…
Last Friday, my friend Freek Van der Herten and I announced two big projects that we've been working on for the last 8 months.
And Ignition a beautiful error page for your Laravel applications. It becomes the default error page in Laravel 6.
While working on a client project over the last couple of weeks, one of the requested features was the ability to fetch incoming emails in the Laravel application. Using services such as Mailgun or Sendgrid, this is perfectly possible, since they offer support for webhooks where they send you either the raw email content, or a parsed version of it so that you can process the message.
While preparing content for my upcoming PHP Package Development video course I discovered that over the last couple of years I spend more and more time polishing my code before shipping it.
And I believe that this is something that is just as important as the actual coding itself.
Let me talk you through some of the adjustments that I try to make, while working on my codebase and how this can hopefully affect your way of writing good and readable code.
While recording the videos for my upcoming PHP Package Development videos, I know that I wanted to cover semantic versioning and explain it in-depth. So rather than only having a video available, once the course is available in the next couple months, I also wanted to provide an extensive write-up on the topic.
As a lot of other people have started to post their write-ups on how 2018 went for them, I want to join them and tell you a little about what happened to me throughout the last 12 months. I think this is also a great way for me to recap what I have achieved over the last year. So here we go.…