Fluent Api

3 weeks ago

joisarjignesh

Fluent Api testing

Code

$array = [
    'first' => 'how r u',
    'second' => 'i m fine',
    'third' => "ok that's great",
    'method' =>  function() {
    	return 'is it working!';
	},
];

$fluent = new Illuminate\Support\Fluent($array);

$fluent->get('second');
$fluent->third;
$fluent->notExistsKey;
$fluent->toJson();
$fluent->toArray();
value($fluent->method);
dd($fluent->getAttributes());