Thursday, January 25, 2018

Front-end Presets for Older Laravel Frameworks

Preset is a new artisan command that provides opinionated scaffolding for various front-end frameworks/libraries such as React, Bootstrap, and Vue.js. This command is very helpful if your projects want to scaffold from the default Laravel's front-end framework, Vue.js, to something else like React. This command also provides you a way to remove all of the presets by running the command: php artisan preset none. At the time of writing, preset artisan command is only available for Laravel 5.5.

Projects that still run on PHP 5 can't use Laravel later than 5.4. Yet, some web hostings still not support PHP 7. Thus, most of them 'stuck' on Vue.js preset.

Of course, you can't be stuck to a front-end framework just because there is no preset artisan command. You can just set up your package.json manually by using npm command and by adding required packages one by one. What if you don't want the hassle of setting up the npm packages?

Laravel

Friday, January 19, 2018

How to Rename Multiple Files Efficiently

Sometimes we want to rename a bulk of files at once. Windows Explorer provides this bulk renaming feature. We can select the files we want to rename (Ctrl + Left click) then press F2 to enter the new name for them. Windows Explorer renames the each of the files with new name plus a numbering.

Rename files with Windows Explorer