PHP code example of andreadam82 / laravel-userstamps

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

    

andreadam82 / laravel-userstamps example snippets

 bash
php artisan vendor:publish --provider="Andreadam82\UserStamps\UserStampsServiceProvider" --tag="config"
 php
public function up()
{
    Schema::create('table_name', function (Blueprint $table) {
        ...

        $table->userstamps();
        $table->softUserstamps();
    });
}   
 php
$model->author; // the user who created the model
$model->editor; // the user who last updated the model
$model->destroyer; // the user who deleted the model