โš™๏ธ Installation

This section provides a comprehensive guide on how to integrate the Laravel Currency Formatter package into your Laravel project. The Laravel Currency Formatter is designed to simplify the process of formatting monetary values according to different global currencies, leveraging the capabilities of PHP and the Laravel framework.

๐Ÿ“ฆ Installing the Package

To incorporate the Laravel Currency Formatter into your project, follow the steps outlined below:

  1. Requirements: Before proceeding, ensure your Laravel project meets the following requirements:

    • Laravel version 7.0 or higher.
  2. Composer Requirement: The package can be installed via Composer, the PHP dependency manager. If you don't have Composer installed, follow the instructions on the Composer website.

  3. Installation Command: Open your terminal, navigate to your project directory, and run the following command:

    composer require magarrent/laravel-currency-formatter
    

    This command will download the package and include it in your project's vendor directory, as well as add it as a dependency in your project's composer.json file.

  4. Service Provider (Optional): If your Laravel project does not automatically discover the package's service provider, you may need to manually add it to the providers array in config/app.php:

    'providers' => [
        /*
         * Package Service Providers...
         */
        Magarrent\LaravelCurrencyFormatter\LaravelCurrencyFormatterServiceProvider::class,
    ],
    
  5. Facade Alias (Optional): If you want to use the facade for syntactic sugar, add the following line to the aliases array in config/app.php:

    'aliases' => [
        /*
         * Class Aliases...
         */
        'Currency' => Magarrent\LaravelCurrencyFormatter\Facades\Currency::class,
    ],
    

๐Ÿ”„ Updating the Package

To update the Laravel Currency Formatter package, run the following command in your terminal:

composer update magarrent/laravel-currency-formatter

This command updates the package to the latest version, following the version constraints defined in your composer.json file.

๐Ÿงช Testing After Installation

After installation, you may want to ensure that everything is set up correctly. Optionally, you can write your own tests or run the package's tests (if available).


Note: The instructions mentioned are fabricated based on common Laravel package installation practices and the information extracted from the provided source code. For real-life usage, it's recommended to consult the actual documentation or repository of the Laravel Currency Formatter package.