mixislv/laravel-model-self-cache
A Laravel package that gives Eloquent models self-caching capabilities, letting models cache their own queries and attributes automatically and invalidate cached data on create, update, or delete. Reduces repeated database hits with minimal changes to existing model code.
composer require <vendor>/<package>:^2.0.php artisan vendor:publish --provider="Vendor\Package\PackageServiceProvider"
config/<package>.php for runtime options$service = app(\Vendor\Package\Contracts\Service::class);
$result = $service->handle($input);
config/<package>.php and environment variables rather than scattering options across code. Use config:cache in deployment pipelines and verify the package reads config lazily, not in a way that breaks cached config.Queue::fake() and Event::fake() where appropriate.public function test_package_operation(): void
{
$this->app->instance(\Vendor\Package\Contracts\Service::class, $fake = Mockery::mock(...));
$fake->shouldReceive('handle')->once()->andReturn('ok');
$this->post('/endpoint')->assertOk();
}
^2.0.composer update <vendor>/<package> --with-dependencies.illuminate/support constraint.^2.0 or a narrower range in production. Avoid * so future major releases do not silently change behavior.composer require fails with conflicting illuminate/* constraints, check the package’s composer.json and your app’s framework version before debugging application code.php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:clear
Then rebuild with config:cache and route:cache in the same way production does.register() unless documented.php artisan about, composer show <vendor>/<package>, and cached config. Laravel 5.x vs 6+ differences often surface as missing bindings or changed framework behavior.How can I help you explore Laravel packages today?