自动定位控制器

时间:2020-05-08 10:13:39   收藏:0   阅读:57
namespace app\index\controller\one;

use think\Controller;

class Blog extends Controller
{
    public function index()
    {
        return $this->fetch();
    }
    
    public function add()
    {
        return $this->fetch();
    }
    
    public function edit($id)
    {
        return $this->fetch(‘edit:‘.$id);
    }
}

我们就可以直接访问下面的URL地址了:

http://serverName/index.php/index/one/Blog

原文:https://www.cnblogs.com/mmore123/p/12848350.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!