mirror of
https://github.com/flarum/core.git
synced 2025-08-06 00:17:31 +02:00
Extract model validation into a trait
Also use Laravel’s ValidationException rather than our own custom one
This commit is contained in:
@@ -19,6 +19,8 @@ class PostsServiceProvider extends ServiceProvider
|
||||
new Extend\PostType('Flarum\Core\Posts\DiscussionRenamedPost')
|
||||
]);
|
||||
|
||||
Post::setValidator($this->app->make('validator'));
|
||||
|
||||
CommentPost::setFormatter($this->app->make('flarum.formatter'));
|
||||
|
||||
Post::allow('*', function ($post, $user, $action) {
|
||||
|
Reference in New Issue
Block a user