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