PHP code example of yfsns / laravel-wechat-login

1. Go to this page and download the library: Download yfsns/laravel-wechat-login 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/ */

    

yfsns / laravel-wechat-login example snippets

bash
# 1. 安装依赖
composer install
# 或者仅安装运行时代依赖并优化自动加载
composer install --no-dev --optimize-autoloader

# 2. 配置环境
cp .env.example .env
php artisan key:generate

# 3. 配置数据库 (.env 文件)
# 执行数据库迁移与数据填充
php artisan migrate --seed

# 4. 创建存储软链接(用于存放上传的文件)
php artisan storage:link

# 5. 启动服务
php artisan serve