Search
 
SCRIPT & CODE EXAMPLE
 

PHP

date format in blade

{{ date('d-m-Y', strtotime($project->start_date)) }}
{{ date('d-m-Y h:i:s', strtotime($project->start_date)) }}
{{ date('h:i:s', strtotime($project->start_date)) }} 
{{ (strtotime($project->start_date) < time()) ? 'text-danger' : '' }}
Comment

laravel 8 date format

// in model 
protected $casts = [
        'date_of_approval' => 'date:d-m-Y'
    ];

// if you want change format any where
$appointment->date_of_approval->format('Y-m-d');

// if you have not cast in model data format
CarbonCarbon::parse($appointment->date_of_approval)->format('Y-m-d');
Comment

laravel date format

now()->addDays()->format('Y-m-d H:i:s') // return '2022-8-22 9:12:13'
Comment

laravel set date format

{{ $post->created_at->diffForHumans() }}
  /*
  	//Output
  Arya Stuck 14 minutes ago
  Post something 
  
  Mizan Khan 23 hours ago
  Post something
  */
Comment

blade format date

{!! htmlspecialchars_decode(date('j<sup>S</sup> F Y', strtotime('21-05-2020'))) !!}
Comment

PREVIOUS NEXT
Code Example
Php :: wordpress shortcode api 
Php :: laravel map the output of the api 
Php :: pagination using ajax 
Php :: string concatenation in php 
Php :: PHP multidimensional array merge recursive 
Php :: php variable definition 
Php :: laravel query builder 
Php :: laravel collection splice 
Php :: get ids from object 
Php :: PHP OOP - Inheritance 
Php :: Declare A PHP Array 
Php :: Magento 2 create admin module 
Php :: Creating dynamic subdomain in php 
Php :: php date with out 0 
Php :: add column migration laravel 8 
Php :: isset php 
Php :: restart php service windows 
Php :: get city name from latitude and longitude in php using geocode api 
Php :: str_contains — Determine if a string contains a given substring 
Php :: status validation laravel 
Php :: find_in_set in laravel 
Php :: laravel create command tutorial 
Php :: laravel empty 
Php :: laravel available router methods 
Php :: cron job setting for laravel in cpanel 
Php :: Call to undefined function array_key_first() 
Php :: advanaced layout builder enfold custom post type 
Php :: codeigniter ellipsis in php read more text 
Php :: csv import laravel 
Php :: Include Custom Post Types Categories to the main query 
ADD CONTENT
Topic
Content
Source link
Name
4+6 =