No release, weekly updates, and 🔥 tip


Dries is out, so there is no Laravel release today.

Weekly Journal

Last week Jess and I continued to make tweaks to existing Shifts. Of note was the automatic conversion of the implicit controllers way back in Laravel 5.1. Previously, Shift directed you to a package from Mohamed. I had wanted to incorporate this into Shift for some time, and kind of missed the window. Nevertheless, the Laravel 5.2 Shift and Laravel 5.3 Shift both now automate converting these routes.

I also had some Human Shifts come in for upgrading multiple outdated Laravel applications. As always, this gave me an opportunity to use Shift myself. So I've been making more small tweaks from things I noticed during these, as well as a live stream I did last week upgrading from Laravel 5.8 to Laravel 8.x.

Jess and I also paired up last Thursday to quickly build an optional to null safe conversion task. This is currently available in the cloud-based Workbench, and will be included in the next update to the desktop app tomorrow.

This week Jess is focusing on making some updates to the Tests Generator. After which, we will also update it to add an option for generating Pest tests.

This week I am focusing mostly on finishing the Human Shifts. I'm also going to revisit the Lumen to Laravel Converter. This has received more usage lately. Many developers who adopted Lumen are probably realizing that Lumen is dead. Or, said another way, Laravel's modern features and advancements have made Lumen obsolete.

🔥 Tip

After watching Laracon and, of course, seeing it in the weekly updates, it has been on my list to use the new model pruning feature.

This appealed to me for Shift as it suffers the same data issue as any e-commerce system - abandon carts.

I dedicated some time yesterday morning, but had everything built and deployed in 20 minutes. I literally copied the example snippets from the documentation with one small tweak to the query:

1public function prunable()
3 return static::where('created_at', '<=', now()->subMonth())
4 ->where('status', Status::CREATED);

Running this manually in production removed almost 4000 records for incomplete Shifts.

This will be automated by the scheduler moving forward and help keep the database clean. This is not something I would've built myself or needed to do. But if the framework provides it, why not use it. 🔥