<?php
namespace app\index\controller;
class Index
{
protected $middleware = [
Auth::class . ':admin' => ['except' => ['hello'] ],
'Hello' => ['only' => ['hello'] ],
];
public function index()
{
return 'index';
}
public function hello()
{
return 'hello';
}
}