datakode/laravel-datakode-utils

0.7.0 2024-12-13 10:33 UTC

This package is auto-updated.

Last update: 2024-12-13 12:43:55 UTC


README

pipeline status coverage report Latest Release

Installation

Installation via packagist

 composer require datakode/laravel-datakode-utils 

En développement, Installation comme git submobule

mkdir -p packages/datakode
cd packages/datakode
git submodule add git@gitlab.com:datakode/laravel-datakode-utils.git

Modifier composer.json de votre projet

"psr-4": {
            "App\\": "app/",            
            "Database\\Factories\\": "database/factories/",
            "Database\\Seeders\\": "database/seeders/",
            "Datakode\\LaravelDatakodeUtils\\": "packages/datakode/laravel-datakode-utils/src/"
        }

Charger le submodule depuis un projet

git submodule update --init --recursive

Charger le service provider

Registrer le service dans app/Providers/AppServiceProvider.php

public function register(): void
    {
        $this->app->register(LaravelDatakodeUtilsServiceProvider::class);
    }

Publier la config

php artisan vendor:publish
php artisan vendor:publish --provider="Datakode\LaravelDatakodeUtils\LaravelDatakodeUtilsServiceProvider"

Routes

Certaines routes sont nécessaires :

<?php
// routes/api.php

DatakodeRoute::prefix('v1')->group(function () {

     DatakodeRoute::insertApiHomeRoute();
    
    // ...
    
    DatakodeRoute::insertProcessingRoutes(); // pour utiliser les exports
    
    // ...
    
});

Documentation

Documentation

Datakode