Posted in php
Posts Tagged ‘example’
We featured View Components in Laravel, written by Jeff Ochoa, as an alternative approach to View Composers. Inspired by Jeffs article, Sebastian De Deyne of Spatie created a Laravel package that brings the concept of a View Component to Laravel applications.
CVE 2018-11235 is a new industry-wide security vulnerability in Git that can lead to arbitrary code execution when a user operates in a malicious repository. In the announcement, Edward Thomson describes the vulenerability: A remote repository may contain a definition for a submodule, and also bundle that submodules repository data, checked in to the parent repository as a folder.
I recently needed a geographical check of users to determine default locales and currencies of users. The torann/geoip package by Daniel Stainback fit the bill nicely to provide GeoIP for Laravel 5 applications.
Adding unique slugs to your eloquent models is made simple through the Eloquent Sluggable package by Colin Viebrock. The gist of using this package is making your Eloquent models sluggable through the Sluggable trait provided by the package, which defines an abstract sluggable() method you use to configure your model-specific configuration.
In software development, one of the best practices is to create reusable code that can be implemented in different parts of your application if needed. Imagine you have a blog, and you need to show a highlights widget on a sidebar.
Developing Composer packages locally through a local file symlink speeds up development immensely when you want to create Laravel packages and try them out on a real application. I was reading about a fancy bash alias by Caleb Porzio, which is a bash alias inspired by npm link.