1. Go to this page and download the library: Download taylornetwork/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/ */
php
use TaylorNetwork\Presenter\Presenter;
class UserPresenter extends Presenter
{
/**
* Get the user's full name
*
* @return string
*/
public function fullName()
{
return $this->model->first_name . ' ' . $this->model->last_name;
}
/**
* Get the time since the user signed up
*
* @return string
*/
public function userSince()
{
return $this->model->created_at->diffForHumans();
}
}
php
<h1>{{ $user->present()->fullName }}, you signed up {{ $user->present()->userSince }}</h1>
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.