1. Go to this page and download the library: Download lazyskills/think-annotation library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
namespace app\controller;
use think\annotation\Inject;
use think\annotation\Route;
use think\annotation\route\Group;
use think\annotation\route\Middleware;
use think\annotation\route\Resource;
use think\Cache;
use think\middleware\SessionInit;
/**
* Class IndexController
* @package app\controller
* @Group("bb")
* @Resource("aa")
* @Middleware({SessionInit::class})
*/
class IndexController
{
/**
* @Inject()
* @var Cache
*/
protected $cache;
public function index()
{
//...
}
/**
* @Route("xx")
*/
public function xx()
{
//...
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.