Laravel Community Tools by Tighten
Laravel Nova icon Nova Packages
N

Larastan Tool

Installation Instructions

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;
}

Readme

Nova Larastan Tool

Run Larastan right from your Laravel Nova application

nova_larastan screenshot

Installation

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;
}

Usage

Click on the "Analyse code" button. That's it.

If Larastan is not installed, you will instead see something like this:

nova_larastan screenshot

Go to LarastanGithubRepository for installation details.

Changelog

Please see CHANGELOG for more information what has changed recently.

Security

If you discover any security related issues, please email ijpatricio (at) gmail dot com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Back to Top
Added 7 years ago
Last updated 7 Years Ago
Version v0.1.7
Composer
ijpatricio/nova-larastan-tool
GitHub stars 6
Packagist downloads 316

Favorites

3 users favorited

Rating

5.00
(out of 5)
★★★★★
★★★★
★★★
★★
1 ratings

Brought to you by Tighten

Issues/Feature Requests Stats Package Ideas