Laravel

How To Install & Configure nova log

This Laravel tutorial helps to understand nova logs. I’ll let you know how to install nova and configure nova logs. Laravel Nova is a commercial admin panel package that provides a range of tools for building web applications on Laravel.

Laravel Nova

The premium administrative panel for the Laravel PHP framework is called Laravel Nova. This can be simply integrated into any Laravel application and offers a straightforward, user-friendly interface for managing resources like users, roles, and permissions.

It helps developers can quickly build custom administration panels for their applications without having to write a lot of repetitive code. It comes with a variety of built-in tools and features:

  • A powerful CRUD (create, read, update, delete) interface for managing resources
  • Advanced filtering and searching capabilities
  • Resource metrics and trends tracking
  • Built-in support for actions and batch processing
  • Automated form validation and error handling
  • Integration with Laravel’s authorization and authentication systems.

The pre-requistes:

How To Install Nova

Let’s install nova premium administrative panel for the Laravel PHP framework.

Laravel Nova has a few requirements you should be aware of before installing:

  • Composer
  • Laravel Framework 8.0+
  • Laravel Mix 6
  • Node.js (Version 14)
  • NPM

Nova 4 installation is always performed via Composer. You may install Nova as a Composer package via the composer.json file:

"repositories": [
    {
        "type": "composer",
        "url": "https://nova.laravel.com"
    }
],

After updating composer.json file, You need to run the composer update command in your console terminal:

composer update --prefer-dist

Once, You run the composer update, you will be prompted to provide a username and password. You need to use your Nova website email as username and a license key as a password.

Let’s run the nova:install and migrate Artisan commands :

Related Post
php artisan nova:install
php artisan migrate

Please make sure to check whether the App\Providers\NovaServiceProvider has been included in the providers array of your application configuration file after executing the given command.

Note: Nova requires a license key and a production URL to be used in production environments.

How To Install Nova Logs

You can install the package into a Laravel app that uses Nova via composer:

composer require php-junior/nova-logs

it is important to note that it only supports the daily log channel. Therefore, you need to ensure that your .env file specifies the LOG_CHANNEL as daily instead of stack.

If you are using Laravel 5.5 or an earlier version, add the following line to your .env file:

APP_LOG=daily

Once this is done, you will need to register the LogViewer tool with Nova. Typically, this is achieved by adding the necessary code to the tools method of the NovaServiceProvider.

// in app/Providers/NovaServiceProvider.php

public function tools()
{
    return [
        // ...
        new \PhpJunior\NovaLogViewer\Tool(),
    ];
}

To publish the configuration use:

php artisan vendor:publish --tag=nova-logs-config

Conclusion

Nova and NovaLog offer a powerful set of tools for Laravel development, but proper configuration is crucial for full functionality. Correct settings in .env and proper tool registration are key to streamlining workflows and debugging issues, saving time and effort.

Recent Posts

Configure and Retrieve S3 Information Using Laravel PHP-AWS-SDK

This tutorial helps integrate a PHP SDK with Laravel. We'll install aws-php-sdk into laravel application and access all aws services… Read More

4 months ago

What is the Purpose of php_eol in PHP?

in this quick PHP tutorial, We'll discuss php_eol with examples. PHP_EOL is a predefined constant in PHP and represents an… Read More

10 months ago

Laravel Table Relationship Methods With Example

This Laravel tutorial helps to understand table Relationships using Elequonte ORM. We'll explore laravel table Relationships usage and best practices… Read More

10 months ago

Exploring the Power of Laravel Eloquent Join?

We'll explore different join methods of Laravel eloquent with examples. The join helps to fetch the data from multiple database… Read More

10 months ago

Quick and Easy Installation of Laravel Valet

in this Laravel tutorial, We'll explore valet, which is a development environment for macOS minimalists. It's a lightweight Laravel development… Read More

11 months ago

What is Laravel Soft Delete and How Does it Work?

I'll go through how to use soft delete in Laravel 10 in this post. The soft deletes are a method… Read More

11 months ago

Categories