PHP code example of alksily / entity
1. Go to this page and download the library: Download alksily/entity 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/ */
alksily / entity example snippets
class Car extends Model {
public $brand = '';
public $mark = '';
public $color = '';
}
$cars = collect([
new Car(['brand' => 'BMW', 'mark' => 'M4', 'color' => 'red']),
new Car(['brand' => 'BMW', 'mark' => 'X5', 'color' => 'yellow']),
new Car(['brand' => 'Peel', 'mark' => 'P50', 'color' => 'blue']), // Peel Engineering Company
]);
var_dump($cars);