/**
  * @before
  */
 protected function seedDatabase()
 {
     // set the standard models in the default scope
     parent::seedDatabase();
     // flag all models as inactive
     foreach (TestModelWithGlobalScope::all() as $model) {
         $model->active = false;
         $model->save();
     }
     // assert that we did in fact 'hide' them
     $this->assertEquals(0, TestModelWithGlobalScope::count(), "Setup failed for global scoped models");
 }
 /**
  * @param int $id
  * @return TestModel
  */
 protected function findStandardModel($id)
 {
     $model = parent::findStandardModel($id);
     $model->setListifyConfig('scope', $this->getScopeQueryBuilder());
     return $model;
 }
 /**
  * @param int $id
  * @return TestModel
  */
 protected function findStandardModel($id)
 {
     $model = parent::findStandardModel($id);
     $model->setListifyConfig('scope', $model->testRelatedModel());
     return $model;
 }
 /**
  * @param int $id
  * @return TestModel
  */
 protected function findStandardModel($id)
 {
     $model = parent::findStandardModel($id);
     $model->setListifyConfig('scope', '`scope` = 1');
     return $model;
 }
 /**
  * @param int $id
  * @return TestModel
  */
 protected function findStandardModel($id)
 {
     $model = parent::findStandardModel($id);
     $model->setListifyConfig('scope', $this->getScopeMethodCallable());
     return $model;
 }