different days in carbon laravel between different dates
$created = new Carbon($survey->created_at);
$now = Carbon::now();
$difference = ($created->diff($now)->days < 1)
? 'today'
: $created->diffForHumans($now);
Also in PHP:
- ation: 1071 Specified key was too long; max key length is 1000 bytes
- $conn or $con php
- doesn't appear favicon php
- "array_key_exists(): + file array laravel
- 500 server error laravel 7
- create migration laravel
- check if string has word
- How to see if there is a - in a string in php
- check array is exist
- explode php
- "customer" attribute not getting saved from admin magento 2
- cache clear in laravel for serve
- 0 and 1 toggle php 7
- date show year first php
- catch in php
- Extract images from a folder in php
- check if key exist in array
- CREATE SEEDERS FROM DATABASES
- datetime php now
- array_reverse function in php
- error_reporting(E_ALL | E_STRICT);
- base64decode php
- Artisan::call('db:seed', array('--class' => 'YourSeeder Class'));
- change execution time php