PHP code example of opscale-co / nova-bpmn-field

1. Go to this page and download the library: Download opscale-co/nova-bpmn-field 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/ */

    

opscale-co / nova-bpmn-field example snippets


Schema::create('diagrams', function (Blueprint $table) {
    $table->id();
    $table->string('name');
    $table->string('bpmn_path')->nullable();
    $table->timestamps();
});

use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Text;
use Laravel\Nova\Http\Requests\NovaRequest;
use Laravel\Nova\Resource;
use Opscale\Fields\BPMN;

class Diagram extends Resource
{
    public static $model = \App\Models\Diagram::class;

    public function fields(NovaRequest $request): array
    {
        return [
            ID::make()->sortable(),
            Text::make('Name')->rules('