1
0
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:
Toby Zerner
2015-07-05 12:25:08 +09:30
parent 04501545e3
commit 53e269fd89
11 changed files with 193 additions and 234 deletions

View File

@@ -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) {