PHP code example of spinon / uccello-archive

1. Go to this page and download the library: Download spinon/uccello-archive 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/ */

    

spinon / uccello-archive example snippets


$table->dateTime('archived_at')->nullable();

public static $ARCHIVED_AT = 'custom_fiedname';

use Spinon\UccelloArchive\Traits\ArchiveTrait;

class MyModel extends Model
{
  use ArchiveTrait;
  ...
}
bash
php artisan vendor:publish --provider="Spinon\\UccelloArchive\\Providers\\AppServiceProvider"
html
@extends('uccello::modules.default.list.main')

@section('script')
    {!! Html::script(mix('js/autoloader.js', 'vendor/spinon/uccello-archive')) !!}
@endsection

 $is_archivable = (method_exists($module->model_class, "isArchivable") && ($module->model_class)::isArchivable() === true);