1. Go to this page and download the library: Download lookitsatravis/listify 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/ */
class User extends Eloquent
{
use \Lookitsatravis\Listify\Listify;
public function __construct(array $attributes = array(), $exists = false) {
parent::__construct($attributes, $exists);
$this->initListify();
}
}
class User extends Eloquent
{
use \Lookitsatravis\Listify\Listify;
public function __construct(array $attributes = array(), $exists = false) {
parent::__construct($attributes, $exists);
$this->initListify([
'scope' => 'answer_to_ltuae = 42'
]);
}
}
class ToDoListItem extends Eloquent
{
use \Lookitsatravis\Listify\Listify;
public function __construct(array $attributes = array(), $exists = false) {
parent::__construct($attributes, $exists);
$this->initListify([
'scope' => $this->toDoList()
]);
}
public function toDoList()
{
$this->belongsTo('ToDoList');
}
}
class ToDoListItem extends Eloquent
{
use \Lookitsatravis\Listify\Listify;
public function __construct(array $attributes = array(), $exists = false) {
parent::__construct($attributes, $exists);
$this->initListify([
'scope' => DB::table($this->getTable())->where('type', '=', 'Not A List of My Favorite Porn Videos')
]);
}
}