Just discovered Laravel's "@.production" blade directive. So useful for all sorts of analytics-y things inside <head> 👌

Laravel

👌Clever little trick to add descriptions to items in a select dropdown - found on Laravel Forge

HTML

@jesseschutt If you don't need the "->has()" then you can clean it up even more. When is a personal fav of mine as well 😃👏

Laravel

I don't think this is in the docs: You can register multiple resource routes in this array style (problem is you lack "only" and "except")

Laravel

Killing conditionals with ltrim and rtrim! Great technique for dealing with optional "/"s at the beginning or end of path strings.

Laravel

Just learned array_filter has a dual purpose! 😍 It eliminates falsy values if no callback is supplied. Works with collections as well 🤠

Laravel

Fun experiment - store and update controller methods are usually frustratingly similar - I made them the exact same... and it works 😱

Laravel

Use @laravelphp Dusk? Speed up your workflow x100000 - introducing "$browser->tinker()" - life changed. https://t.co/Ni7CCVPM8d

Laravel

Route::apiResource is Route::resource without registering "create" and "edit" routes. Thanks @waunakeesoccer1 for showing me this!

Laravel

Discovered Eloquent's "latest()" works with custom column names. Use it anywhere you use ->orderBy(xxxx, 'desc')

Laravel

Love when "min" or "max" can kill a conditional 😎

PHP

I always forget how to read composer versions: "^", "~", "<=", "*".... so I made little cheatsheet - enjoy☝️

PHP

The tweet will be reviewed and posted as soon as possible

{{ newSnippetForm.errors.url[0] }}

{{ newSnippetForm.errors.categories[0] }}