PHP code example of taylornetwork / name-formatter
1. Go to this page and download the library: Download taylornetwork/name-formatter 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/ */
taylornetwork / name-formatter example snippets
use Illuminate\Eloquent\Model;
use TaylorNetwork\Formatters\Name\FormatsFullName;
class Customer extends Model
{
use FormatsFullName;
protected $fillable = [
'first_name', 'last_name', 'address',
];
}
echo $customer->fullName;
use Illuminate\Eloquent\Model;
use TaylorNetwork\Formatters\Name\FormatsFullName;
class Customer extends Model
{
use FormatsFullName;
protected $fillable = [
'first_name', 'last_name', 'address',
];
public function formatterConfig(&$formatter)
{
$formatter->style('L, F');
}
}