quantumtecnology/service-basics-extension
A Laravel extension for the Service Basics package that adds extra helpers and conventions for service providers, container bindings, and package wiring, making it quicker to register and organize application services with consistent, reusable patterns.
Treat this package as a thin service-layer convention, not a full framework. Start by proving what it actually provides before designing around it.
composer require quantumtecnology/service-basics-extension
cat vendor/quantumtecnology/service-basics-extension/composer.json
find vendor/quantumtecnology/service-basics-extension -maxdepth 3 -type f | sort
Look for:
src/Providers/*ServiceProvider.phpconfig/ and publishable assetscomposer.jsonphp artisan package:discover
php artisan about
If the provider is not auto-discovered, register it manually in bootstrap/providers.php or config/app.php.
php artisan vendor:publish --tag=service-basics-extension-config
Use the actual tag/provider from the package source; do not guess.
CreateOrder, UpdateCustomer, or ApproveInvoice. Put validation in a FormRequest, keep the controller thin, and move the transaction and domain steps into a service class. If the package provides a base service or contract, extend/implement it only when it removes real boilerplate. If it does not fit, compose it rather than forcing inheritance.Minimum viable Laravel shape:
final class CreateOrderService
{
public function __construct(
private readonly OrderRepository $orders,
) {}
public function handle(CreateOrderData $data): Order
{
return DB::transaction(function () use ($data) {
$order = $this->orders->create($data->toArray());
// domain steps here
return $order;
});
}
}
Then bind it if you introduce an interface:
$this->app->bind(CreateOrderService::class, CreateOrderService::class);
Use the package as a service-layer anchor, not as a replacement for Laravel conventions.
CreateOrderService, CancelSubscriptionService, or InvoiceService over a single EverythingService.DB::transaction() for multi-step writes. Repositories should not secretly open transactions.ServiceBasicsExtensionServiceProvider or your AppServiceProvider using bind/singleton as appropriate.Request objects into services. Pass FormRequest-validated data or a small DTO so the service is testable outside HTTP.index, store, update, destroy hooks, then let package helpers handle only the repetitive parts.composer.lock. Because adoption is low, avoid floating constraints like ^1.0 without reviewing the actual release diff.Example binding pattern:
// app/Providers/AppServiceProvider.php
public function register(): void
{
$this->app->bind(OrderService::class, function ($app) {
return new OrderService(
$app->make(OrderRepository::class),
);
});
}
Example controller pattern:
public function store(CreateOrderRequest $request, CreateOrderService $service): JsonResponse
{
$order = $service->handle(CreateOrderData::fromRequest($request));
return response()->json(OrderResource::make($order), 201);
}
vendor/. Use composer show quantumtecnology/service-basics-extension to confirm the installed version and requirements.php artisan package:discover
composer dump-autoload
php artisan optimize:clear
php artisan config:clear locally and rebuild caches in deployment.__call, dynamic filters, or convention-based CRUD, add explicit tests around the exact paths you use. Magic is hard to debug when method names or model attributes change.php artisan tinker
app(YourService::class);
Use get_class() and dd() to confirm which implementation is actually resolved.
vendor/ to understand your service layer.How can I help you explore Laravel packages today?