Run Larastan right from your Laravel Nova application
You can install the package in to a Laravel app that uses Nova via composer:
composer require ijpatricio/nova-larastan-tool
Next up, you must register the tool with Nova. This is typically done in the tools
method of the NovaServiceProvider
.
// in app/Providers/NovaServiceProvider.php
// ...
public function tools()
{
return [
// ...
new \Ijpatricio\NovaLarastanTool\NovaLarastanTool(),
];
}
As Larastan is mainly for a dev environment, to keep the dependencies dev
only, you can setup previous tools()
method as following:
public function tools()
{
$tools = [
//... your regular tools
];
if (app()->environment() === 'local') {
$tools = array_merge($tools, [
//... your require-dev tools
new \Ijpatricio\NovaLarastanTool\NovaLarastanTool()
]);
}
return $tools;
}
Click on the "Analyse code" button. That's it.
If Larastan is not installed, you will instead see something like this:
Go to LarastanGithubRepository for installation details.
Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please email ijpatricio (at) gmail dot com instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.