zareismail/nova-contracts
Laravel Nova package for managing contracts inside your admin panel. It adds Nova resources and tools to create, organize, and track contracts and related records, making contract administration simpler.
This package assumes Laravel Nova is already installed. The last release is from 2022-03-26, so it likely targets Nova 3.x/4.x and Laravel 8/9 — confirm before installing into a newer stack.
composer require zareismail/nova-contracts
config/app.php.php artisan vendor:publish
Then publish the nova-contracts config/migrations by tag or provider.contractable morph columns) and indexes, then php artisan migrate.app/Nova/NovaServiceProvider.php (or via Nova::resources([...])).Where to look first: the service provider (register/boot), the published config, the migration, and the Nova resource class. Those four files tell you the entire integration surface.
Select/Badge for status, a date field for expiration, BelongsTo for customer, and a morph field for contractables. Add a HasMany/MorphMany on the customer resource so contracts show on the customer detail page.Relation::enforceMorphMap([...]) before production data exists. This stops the package from storing full class names in contractable_type and makes refactors safe.App\Contracts\ContractManager (or repository) with createFor(Model $owner, array $data), expireDue(), renew(Contract $c). Bind the package model behind it so Nova resources, jobs, and controllers never reference the vendor class directly. This is your exit path.Schedule::command('contracts:expire')->daily()), not just a Nova filter. Flip statuses and fire notifications from the wrapper. Add scopeActive and scopeExpiringSoon there too.RenewContract and TerminateContract actions to the resource (subclass it, don't edit vendor code). Keep the business logic in the wrapper; the action is just the UI trigger.fields(), filters(), actions(). Register your subclass instead of the vendor resource in NovaServiceProvider.ContractPolicy. Nova uses policies for authorization, and without one non-super-admins will see nothing.^1.0, compare the package's composer.json constraints against your Laravel/Nova versions, and run its tests plus your own before adopting. A stable tag is not a support commitment.php artisan vendor:publish with no arguments to list tags, or read the provider's publishes() array. Do not guess the provider FQCN.php artisan config:clear. If the config reads env at boot, test config:cache in staging — a failure there is a deployment blocker.Date fields store dates; DateTime fields have timezone behavior. Store UTC, display in app timezone. Off-by-one expiry is the most common contract bug.canSee/canRun closures that override your policy.composer audit on a schedule, and track advisories as a health signal.down() migrations before relying on them — they may drop tables.How can I help you explore Laravel packages today?