AnimeController.php 384 B

1234567891011121314151617181920
  1. <?php
  2. namespace app\controllers;
  3. use app\models\Anime;
  4. class AnimeController extends \lithium\action\Controller {
  5. public $publicActions = array('view');
  6. public function view($id = null)
  7. {
  8. if (is_numeric($id)) {
  9. return Anime::search($id, null, 'special_id');
  10. }
  11. else {
  12. return $this->redirect(array('controller' => 'search','q' => array('search' => $id)));
  13. }
  14. }
  15. }