1. Go to this page and download the library: Download caffeinated/presenter 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/ */
caffeinated / presenter example snippets
...
use Caffeinated\Presenter\Traits\PresentableTrait;
class Example extends Eloquent
{
use PresentableTrait;
...
}
...
use Caffeinated\Presenter\Traits\PresentableTrait;
class Example extends Eloquent
{
use PresentableTrait;
protected $presenter = 'App\Presenters\Page';
...
}
namespace App\Presenters;
use Caffeinated\Presenter\Presenter;
class Page extends Presenter
{
...
}
namespace App\Presenters;
use Caffeinated\Presenter\Presenter;
class Page extends Presenter
{
public function title()
{
return ucwords($this->entity->title);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.