PHP code example of caleeli / laravel-nayra

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

    

caleeli / laravel-nayra example snippets


<pre>
[<a href="/start">Start a New Request</a>]
<u>Request Id</u>: {{ $instance->getId() }}
<u>Status</u>: {{ $request->status }}
<u>Active Tasks</u>:
@foreach($instance->getTokens() as $token)
 - {{ $token->getOwnerElement()->getName() }} @if(in_array($token->getOwnerElement()->getBpmnElement()->localName, ['task', 'userTask'])) [<a href="/complete/{{ $instance->getId() }}/{{ $token->getId() }}">complete</a>]@endif

@endforeach
<u>Data</u>:
@json((object) $instance->getDataStore()->getData(), JSON_PRETTY_PRINT)
</pre>
<script>
setInterval('location.reload()', 5000);
</script>

php artisan serve

php artisan queue:work