PHP code example of syberisle / laravel-scribe

1. Go to this page and download the library: Download syberisle/laravel-scribe 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/ */

    

syberisle / laravel-scribe example snippets


SomeModel::find(1)->log('hi there');

// retrieving model logs
SomeModel::find(1)->logs();
// or
SomeModelLogs::all();

php artisan make:scribe:model 'App\Models\SomeModel'


use SyberIsle\Laravel\Scribe\Model\HasLogs;

class MyModel
{
    use HasLogs;
    
    protected $logModel = MyModelLog::class
    ...
}