for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace App\Traits;
trait ActivateableTrait
{
/**
* Scope where active.
*
* @param $query
* @param $active
* @return mixed
*/
public function scopeActive($query, $active = true)
return $query->whereActive((int)$active);
}