1. Go to this page and download the library: Download saviogodinho2002/driftguard 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/ */
saviogodinho2002 / driftguard example snippets
// array cru
'fields' => [
['name' => 'gatilhos', 'type' => 'string', 'llm_instructions' => 'termos de busca'],
],
// ou fluente (com autocomplete, valida no momento da construção)
use Saviogodinho2002\DriftGuard\Support\FieldSpec;
'fields' => [
FieldSpec::string('gatilhos')->instructions('termos de busca'),
FieldSpec::enum('classe_acesso', ['publico', 'restrito'])->instructions('...')->
'cli_harness' => [
'timeout' => 600, // por exemplo, sem precisar redefinir o preset inteiro
],
FieldSpec::scopeClass('escopo_tenant')->instructions(
'Regra de acesso multi-tenant deste model. Primeiro confira o próprio model: global scopes ' .
'(booted()/addGlobalScope), scopes locais, e relações que já implicam limite de tenant ' .
'(ex: belongsTo(Empresa::class)). Se a regra não estiver visível aí, NÃO infira a partir de ' .
'como um controller filtra manualmente — pode ser inconsistente entre pontos de entrada ' .
'diferentes. Use request_file pra pedir um middleware/trait específico só se souber o path ' .
'exato; senão, use ask_question.'
),
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.