定制 spaanproductions/office365-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

spaanproductions/office365-laravel

最新稳定版本:v0.0.4

Composer 安装命令:

composer require spaanproductions/office365-laravel

包简介

A Office365 package for Laravel 9.0 or higher

README 文档

README

A Office365 package for Laravel 9.0 or higher

Installation

composer require spaanproductions/office365-laravel

This package wil register this ServiceProvider automatically in Laravel.

SpaanProductions\Office365\Office365ServiceProvider::class,

You can optionaly publish the config files.

php artisan vendor:publish --provider="SpaanProductions\Office365\Office365ServiceProvider"

Get your app id and secret from Application Registration Portal

Then put them in the environment file

OFFICE365_TENANT_ID=
OFFICE365_CLIENT_ID=
OFFICE365_CLIENT_SECRET=
OFFICE365_OBJECT_ID=
OFFICE365_REDIRECT_URI=http://localhost:8000/redirect
OFFICE365_SCOPES='openid profile offline_access User.Read Mail.Read'

Example Usage

<?php

namespace App\Http\Controllers;

use SpaanProductions\Office365\Facade\Office365;

class AuthController extends Controller
{
    public function signin()
    {
        $link = Office365::login();

        return redirect($link);
    }

    public function redirect()
    {
        if (!request()->has('code')) {
            abort(500);
        }

        $code = Office365::getAccessToken(request()->get('code'));

        $user = Office365::getUserInfo($code['token']);

        $messages = Office365::getEmails($code['token']);

        dd($user, $messages);
    }
}

Methods supported by this package and their parameters can be found in the API Reference

Issues

If you have any questions or issues, please open an Issue .

统计信息

  • 总下载量: 13
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-12-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固