Posts about WordPress, PHP, Laravel and general web development.


Carbon Dates with Laravel Blade

If you have something like this: {{ $task->created_at }} and it comes out like: 2019-09-11 10:26:21 then use Carbon (which is already in Laravel): {{ $task->created_at->diffForHumans() }} and you'll get: 1 week ago instead. Carbon:...

read more

Basic Laravel 6 Setup with Auth, Git, DB and Telescope.

In Terminal CD to your Projects folder Run [laravel new projectName] In GitHub desktop, add a Local Repository, add a readme and Laravel GitIgnore and push it to GitHub Open your database UI and create a new one with an appropriate name Add connection information to...

read more

dd() in a View

Using dd($var); in your code is a great way to see what's going on but you can also do this in a view using this Blade directive: @dump($var)  

read more