LogService.php 633 B

123456789101112131415161718192021222324252627282930313233
  1. <?php
  2. /**
  3. * Author: lf
  4. * Blog: https://blog.feehi.com
  5. * Email: job@feehi.com
  6. * Created at: 2020-01-23 13:50
  7. */
  8. namespace common\services;
  9. use backend\models\search\AdminLogSearch;
  10. use common\models\AdminLog;
  11. use yii\base\Exception;
  12. class LogService extends Service implements LogServiceInterface
  13. {
  14. public function getSearchModel(array $options=[])
  15. {
  16. return new AdminLogSearch();
  17. }
  18. public function getModel($id, array $options = [])
  19. {
  20. return AdminLog::findOne($id);
  21. }
  22. public function newModel(array $options = [])
  23. {
  24. throw new Exception("Not need new model");
  25. }
  26. }