• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Laravel Carbon throws error The format separator does not match

phplaraveldatedatetimelaravel-5


PHP Snippet 1:

date("D d M", strtotime("2017-02-09 18:30:00"));
//outputs "Thu 09 Feb"

date("D d M", strtotime($matchArr['matchTime']);

PHP Snippet 2:

date('l j F', strtotime($matchArr['matchTime']))

PHP Snippet 3:

Carbon::createFromFormat('Y-m-d H:i:s', '2017-02-09 18:30:00');

Related Snippets

phpunit - testing is painfully slow

How to debug in WooCommerce 3+

Fatal error: Uncaught TypeError: count(): Argument #1 ($var) must be of type Countable|array, null given in

Laravel/docker-compose/redis - Class 'Redis' not found

PHP array stringify

How to upload mpdf file after generating to s3 bucket in php

Normalize DateInterval in PHP

Vimeo API: how to save a vimeo into a subfolder?

The difference when using if statement true === something() vs something() === true [duplicate]

How to get quarter for future date using Carbon?

How to test laravel controller method?

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

Cross-Origin Resource Sharing (CORS) witth Laravel and Vuejs

Merge key and value of array index [duplicate]

Laravel after login Two factor not working

About Contact Privacy policy Terms and conditions