Artisan & publishing
notify:make
Section titled “notify:make”php artisan notify:make OrderOrderedphp artisan notify:make Shop/OrderOrderedCreates a BaseNotify subclass in App\Notifications (subdirectories via /). Notify is appended to the class name when missing; {{ notifyKey }} in the stub becomes the name without the suffix. The generated class is final, implements ShouldQueue, uses Queueable, takes string $roleKey in the constructor, and has empty prepareText() and typeDefinition() scaffolding.
The command has no options; it refuses to overwrite an existing class.
A stubs/notify.stub file in the project root replaces the package stub.
Publishing
Section titled “Publishing”| Tag | Publishes |
|---|---|
notify-templates-config | config/notify-templates.php |
notify-templates-migrations | The migrations not yet present in database/migrations: create_notifytemplates_tables, create_notify_logs_table, add_content_to_notify_logs_table |
notify-templates-lang | lang/vendor/notify-templates/{en,uk}/log.php |
php artisan vendor:publish --tag=notify-templates-migrationsEach migration gets a timestamp one second later than the previous one, so they run in the listed order.
Pruning the log
Section titled “Pruning the log”Not a package command — Laravel’s model:prune, scheduled by you:
Schedule::command('model:prune', ['--model' => [\Fomvasss\NotifyTemplates\Models\NotifyLog::class]])->daily();