Laravel
This is the official documentation of the forestadmin/laravel-forestadmin
v2+ and forestadmin/symfony-forestadmin
PHP agents.
Add forestadmin/laravel-forestadmin to your Laravel app
composer require forestadmin/laravel-forestadmin
Run the following commands in your terminal
php bin/console forest:install THE-KEY-PROVIDED-BY-FORESTADMIN
Once the installation is finish, you have a new configuration file (config/forest.php
) and two environments variables in your .env
use ForestAdmin\AgentPHP\Agent\Builder\AgentFactory;
use ForestAdmin\AgentPHP\DatasourceEloquent\EloquentDatasource;
return static function () {
$defaultDB = config('database.default');
$forestAgent = app()->make(AgentFactory::class);
$forestAgent->addDatasource(
new EloquentDatasource(config('database.connections.' . $defaultDB)),
);
};
Running
php artisan serve
should be enough to be redirected to the "rate-install" page.
Last updated
Was this helpful?