Skip to content

Instantly share code, notes, and snippets.

<?php
/**
* Luca Perna - Webdeveloper
* Team Dementia
* [email protected]
*
* Date: 25.10.19
*/
namespace Tests\Unit;
@MrMadClown
MrMadClown / Example.php
Created May 12, 2020 14:07
\Illuminate\Database\Eloquent\Concerns\HasAttributes::originalIsEquivalent object cast comparison
class Ticket extends Model {
protected $casts = [
'content' => 'object',
];
}
$ticket = new Ticket();
$ticket->content = \json_decode('{"key":""}');
$ticket->save();