PHP code example of ngoubaux / delatbabel-fluents
1. Go to this page and download the library: Download ngoubaux/delatbabel-fluents library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ngoubaux / delatbabel-fluents example snippets
$myArray = [];
$myArray['first'] = 'one';
$myArray['second'] = 'two;
echo $myArray['first']; // prints "one"
$myObject = new Fluent();
$myObject->first = 'one';
$myObject->second = 'two';
echo $myObject->first; // prints "one"
use Delatbabel\Fluents\Fluents;
class User extends Eloquent {
use Fluents;
}
$myFluent = new Fluent();
$myFluent->first = 'one';
$myUser = new User();
$myUser->fromFluent($myFluent);
use Delatbabel\Fluents\Fluents;
class User extends Eloquent {
use Fluents;
}
$myUser = User->find(1);
$myFluent = User->toFluent();