PHP code example of timmcleod / agent-workflows-ui
1. Go to this page and download the library: Download timmcleod/agent-workflows-ui 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/ */
timmcleod / agent-workflows-ui example snippets
// app/Providers/AppServiceProvider.php
use Illuminate\Support\Facades\Gate;
public function boot(): void
{
Gate::define('viewAgentWorkflows', function ($user) {
return $user->isAdmin();
});
}
return [
// URI prefix the dashboard is mounted under.
'path' => env('AGENT_WORKFLOWS_UI_PATH', 'agent-workflows'),
// Middleware for the dashboard routes.
'middleware' => ['web', TimMcLeod\AgentWorkflowsUi\Http\Middleware\Authorize::class],
// How often (ms) pages refresh their data.
'polling' => 2500,
// How many runs the index lists.
'runs' => 50,
];