Closed Mikearaya closed 4 months ago
where is the code located?
config/bootstrap.php also after investigating further i noticed the events are not registered completely in spaces. specifically content. events so they are never triggered with `$this->app->trigger('content.)`
right, because spaces are "stand-alone" cockpit instances. you need to create .spaces/{spacename}/config/bootstrap.php
with the event binding code
That was the issue. thank you so much for your awesome support.
@aheinze is there a way i can automatically generate the default bootstrap.php config i have whenever a new space is created? maybe using $this->app->on('spaces.config.create')
for example i have content.item.save.before handler to auto-generate slug for content. $app->on('content.item.save.before', function($modelName, &$data, $isUpdate) {
})
while this works on the main site it is not triggered in spaces