1. Go to this page and download the library: Download qingyuexi/think-addons 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 addons\putong\demo\controller;
class Admin
{
public function index()
{
echo 'hello link';
}
}
namespace addons\putong\demo\controller;
use think\addons\Controller;
class Admin extends Controller
{
public function index()
{
return $this->fetch();
}
}