Category: Blog

Laravel Favicon Package

Laravel Favicon is a package by Marcel Pociot that enables you to create dynamic favicons based on your environment settings:  The package works by using a favicon() helper function in your template, which is then modified in the environments you configure: <link rel="icon" type="image/png" sizes="32x32" href="{{ favicon(asset('favicon-32x32.png')) }}"> Here’s an example of the default enabled environment configuration at the time of writing to give you an idea the values you can specify: 'enabled_environments' => [ 'local' => [ 'text' => 'DEV', 'color' => '#000000', 'background_color' => '#ffffff', ], ], It uses Intervention Image, which at the time of...

Read More

Laravel Tinker Server Package

Laravel Tinker Server is a package by Marcel Pociot that enables you to tinker with your variables in real-time while working on your Laravel app. This package collects data via calls to a tinker() helper that ships with the package and allow you to then interact with those variables on the fly. Related: Laravel Dump Server The best way to demonstrate this package is the following gif from the project’s README file: The primary usage for this is first starting up a tinker server in a new console session: php artisan tinker-server Then when you call tinker() from within...

Read More

Github Adds Draft Pull Requests

Github just launched a brand new feature named draft pull requests that will allow you to start a PR before you are finished implementing all the code changes. At GitHub, we’ve always felt that you should be able to open a pull request to start a conversation with your collaborators as soon as your brilliant idea or code is ready to take shape. Even if you end up closing the pull request for something else, or refactoring the code entirely, a good pull request is as much about collaboration as it is about code. But what if you want...

Read More

Laravel 5.7.26 Released

The Laravel team released Laravel 5.7.26 yesterday with a new pipeline method and a method to temporarily bypass model events. First, a new Pipeline method thenReturn was added by Tim MacDonald to allow additional work do be done on the object passed through: // Previously $users = app(Pipeline::class) ->send(User::query()) ->through($pipes) ->then(function ($query) { return $query ->whereConfirmedEmail() ->whereAccountActive() ->get(); }); // As of 5.7.26 you can use `thenReturn()` $users = app(Pipeline::class) ->send(User::query()) ->through($pipes) ->thenReturn() ->whereConfirmedEmail() ->whereAccountActive() ->get(); Next, a few public getter methods were added: IlluminateCacheTaggedCache::getTags(); IlluminateHttpResponseTrait::getCallback(); License files were added to each Illuminate components since Laravel uses subtree splits...

Read More

MySQL Backups Course

Have you ever deleted a production database? Deleted an incorrect row? Had a server crash and corrupt the DB? Or ran the wrong code against the wrong database? If you’ve been in the industry long enough, you’ll either experience something like this, or you’ll hear the horror stories from your peers. It doesn’t have to be this way, and Servers for Hackers launched a new MySQL Backups course to teach you how to guard against accidents. The course includes 43 separate videos and over 6 hours of content. Some of the stuff you will learn include: InnoDB and Transactions...

Read More