A Tailwind CSS Preset for Laravel 5.5 Laravel News Podcast host, Michael Dyrynda, quickly released a Tailwind CSS preset for Laravel 5.5 shortly after the first release of the open-source version of this excellent utility-first CSS library: View image on Twitter Michael Dyrynda @michaeldyrynda Took a run at making a basic @ tailwindcss scaffolding preset for @ laravelphp https:// github.com/michaeldyrynda /laravel-preset-tailwind … 6:12 PM - Nov 1, 2017 11 11 Replies 28 28 Retweets 136 136 likes Twitter Ads info and privacy To install the preset and start using it in Laravel, you can use the php artisan preset command: composer require laravel-frontend-presets/tailwindcss php artisan preset tailwindcss npm install npm run dev If you want to include auth views, run this preset instead: php artisan preset tailwindcss-a...
Short and safe array iteration One reason to follow development mailing lists is you sometimes pick up on some very neat tricks. Here's one that I spotted on the PHP Internals list recently to simplify array iteration in PHP 7. PHP's largely loose, dynamic typing has plenty of both pros and cons. One con in particular is that you don't always know for sure if a value you're trying to use has been set yet, or is non-null. PHP will dutifully whine at you if you try to use a null value, sometimes fatally. (Yet another reason to structure your code to avoid nulls, period.) One place this comes up in particular is in foreach() loops, especially when working with nested array structures. (PHP lacks a struct type, but makes anonymous hash maps so easy that they get used as the uber data type, for better or worse.) Consider the following: <?php foreach ( $definition [ 'keys' ] as $id => $val ) { // ... } ?> This not-at-all uncommo...
PHPStorm's performance Java VM options PHPStorm is made in Java. If you ever played Minecraft, you know you could allocate extra RAM by adding flags to your startup command. You can also do this in PHPStorm, it's even built into the UI. Go to help > Edit Custom VM Options . You can play around with the settings here. I for one changed the maximum amount of RAM allocated to PHPStorm, and added two graphics options (at the end of the file). -Xms500m -Xmx1500m -Dawt.useSystemAAFontSettings=lcd -Dawt.java2d.opengl=true # Only for people on Mac, it makes Java use an optimised graphics engine. -Dapple.awt.graphics.UseQuartz=true Custom properties PHPStorm also has a file to set custom properties: help > Edit Custom Properties . Adding one option here changed the way PHPStorm renders text: it will show text immediately, instead of analysing it first. The downside is that you can sometimes see a flash of unstyled text. It feels much smoother though. editor.zer...
Comments
Post a Comment