1
0
mirror of https://github.com/flarum/core.git synced 2025-07-19 07:41:22 +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,8 +19,6 @@ class CoreServiceProvider extends ServiceProvider
return get_class($command).'Handler@handle';
});
Model::setValidator($this->app['validator']);
Forum::allow('*', function (Forum $forum, User $user, $action) {
return $user->hasPermission('forum.'.$action) ?: null;
});