dovstone/symfony-blog-admin-bundle-pairdb-based
composer require vendor/package-name
config/app.php under providers:
Vendor\PackageName\PackageServiceProvider::class,
php artisan vendor:publish --provider="Vendor\PackageName\PackageServiceProvider" --tag="config"
README.md for basic usage examples (e.g., facade/class helpers, configuration keys, or CLI commands). Start with a simple integration (e.g., logging, API client, or model observer) to test functionality.PackageName::method()), use it for concise syntax in controllers/blade templates.
$result = PackageName::action($input);
App\Contracts\ServiceInterface). Extend or replace bindings in AppServiceProvider if needed.
$this->app->bind(
App\Contracts\ServiceInterface::class,
Vendor\PackageName\Services\CustomService::class
);
PackageName\Events\EventName), listen in EventServiceProvider:
protected $listen = [
'PackageName\Events\EventName' => [
'App\Listeners\HandleEvent',
],
];
PackageName\Middleware\Authenticate) in app/Http/Kernel.php:
protected $routeMiddleware = [
'package.auth' => \Vendor\PackageName\Middleware\Authenticate::class,
];
config/package-name.php (published via vendor:publish).php artisan to list package commands (e.g., package:generate). Use them for scaffolding or maintenance tasks.Mockery or createMock():
$mock = $this->mock(Vendor\PackageName\Contracts\Service::class);
$mock->shouldReceive('method')->andReturn($response);
App\) don’t conflict with the package’s internal namespaces (e.g., Vendor\PackageName\Internal).config/package-name.php.^8.0), ensure your composer.json aligns to avoid autoloading errors.priority in EventServiceProvider to control execution order:
Event::listen(
'PackageName\Events\EventName',
'App\Listeners\Listener',
100 // Higher priority runs first
);
APP_DEBUG=true in .env) to surface package-related logs.php artisan container:dump
package.log) if it provides one.AppServiceProvider:
$this->app->singleton(
Vendor\PackageName\Contracts\Service::class,
App\Services\CustomService::class
);
class ExtendedModel extends Vendor\PackageName\Models\ModelName {
public function customMethod() { ... }
}
PackageName::extend()), use them to inject logic:
PackageName::extend(function ($service) {
$service->addCustomFeature();
});
boot() if they’re only needed in specific routes.$data = Cache::remember('package_key', 60, function () {
return PackageName::fetchData();
});
How can I help you explore Laravel packages today?