1. Go to this page and download the library: Download vuer/notes 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
namespace App;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Vuer\Notes\Traits\HasNotes;
class User extends Authenticatable
{
use HasNotes;
public function getNotesAuthorName()
{
return trim(sprintf('%s %s', $this->name, $this->surname));
}
}
php
$notes = $user->notes;
$note = $user->note;
php
protected $fillable = [
'description',
];
public function setDescriptionAttribute($value)
{
$this->updateOrCreateNote([], ['body' => $value]);
}
public function getDescriptionAttribute()
{
return $this->note ? $this->note->body : '';
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.