added signups to forms listing
This commit is contained in:
@ -39,6 +39,11 @@ 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.'%');
|
||||
}
|
||||
|
Reference in New Issue
Block a user