PHP code example of trappar / alice-generator
1. Go to this page and download the library: Download trappar/alice-generator 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/ */
trappar / alice-generator example snippets
class Post {
public $title;
public $body;
public $postedBy;
}
class User {
public $username;
}
$user = new User();
$user->username = 'Trappar';
$post1 = new Post();
$post1->title = 'Is Making Fixtures Too Time Consuming?';
$post1->body = 'Check out Alice!';
$post1->postedBy = $user;
$post2 = new Post();
$post2->title = 'Too Much Data to Hand Write?';
$post2->body = 'Check out AliceGenerator!';
$post2->postedBy = $user;