Let the statisticsForms model return the total signups instead of the form model

- added unit test for getTotalSignups() method
This commit is contained in:
Jonathan Labreuille
2016-07-19 17:38:45 +02:00
parent 515515ba9f
commit 362ee49ce4
4 changed files with 22 additions and 8 deletions

View File

@ -39,11 +39,6 @@ class Form extends Model {
return parent::save();
}
function withSignups() {
$this->signups = StatisticsForms::where('form_id', $this->id)->count();
return $this;
}
static function search($orm, $search = '') {
return $orm->whereLike('name', '%'.$search.'%');
}