datakode / laravel-datakode-utils
0.7.0
2024-12-13 10:33 UTC
Requires
- php: ^8.3
- ext-zip: *
- anourvalar/eloquent-serialize: ^1.2
- barryvdh/laravel-dompdf: ^2.0
- f9webltd/laravel-deletable: ^2.0
- gasparesganga/php-shapefile: ^3.4
- laravel/framework: ^11.0
- maatwebsite/excel: ^3.1
- matanyadaev/laravel-eloquent-spatial: ^4.2
- spatie/laravel-data: ^4.0
- spatie/laravel-json-api-paginate: ^1.14
- spatie/laravel-query-builder: ^5.2
- spatie/laravel-typescript-transformer: ^2.3
- wildside/userstamps: ^2.3
Requires (Dev)
- driftingly/rector-laravel: ^1.0
- nunomaduro/collision: ^8.1
- pestphp/pest: ^2.34
- phpstan/extension-installer: ^1.3
- phpstan/phpstan: ^1.10
- phpunit/phpunit: *
- roave/security-advisories: dev-latest
- symplify/easy-coding-standard: ^12.1
- tomasvotruba/cognitive-complexity: ^0.2
README
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
// ...
});