1. Go to this page and download the library: Download ctfang/laravel-watch 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/ */
ctfang / laravel-watch example snippets
namespace App\Http\Controllers\User;
use Illuminate\Http\Request;
class LoginController
{
public function login(Request $request)
{
// 登陆成功
return ['request' => $request , 'user_id' => 1];
}