1. Go to this page and download the library: Download petrelli/live-statics 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 App\Interfaces\ProjectInterface;
class Project extends Model implements ProjectInterface
{
#...
}
use \App\Interfaces\ProjectInterface;
class Controller extends BaseController
{
public function index(ProjectInterface $model)
{
# Use your Project instance as normal
# $model->all();
# $model->published()->get();
}
}
use \App\Interfaces\ProjectInterface;
class Controller extends BaseController
{
public function index()
{
$model = app(ProjectInterface:class);
# Use your Project instance as normal
# $model->all();
# $model->published()->get();
}
}