krayin/krayin-google-integration
Composer 安装命令:
composer require krayin/krayin-google-integration
包简介
Krayin Google Integration
README 文档
README
1. Introduction:
Krayin Google Integration.
It packs in lots of demanding features that allows your business to scale in no time:
- Admin user can connect to their google account.
- User can fetch all events from selected calendars
- Support two-way synchronization for events
- Support real time event synchronization
- User can create google meet link directly from activity form
2. Requirements:
- Krayin: v2.0.0 or higher.
3. Installation:
- Go to the root folder of Krayin and run the following command
composer require krayin/krayin-google-integration
- Run these commands below to complete the setup
php artisan migrate
php artisan route:cache
php artisan vendor:publish --force
-> Search GoogleServiceProvider navigate to it and then press enter to publish all assets and configurations.
4. Configuration:
- Goto routes/breadcrumbs.php file and add following lines
Breadcrumbs::for('google.calendar.create', function (BreadcrumbTrail $trail) { $trail->parent('dashboard'); $trail->push(trans('google::app.calendar.index.title'), route('admin.google.index', ['route' => request('route')])); }); Breadcrumbs::for('google.meet.create', function (BreadcrumbTrail $trail) { $trail->parent('dashboard'); $trail->push(trans('google::app.meet.index.title'), route('admin.google.index', ['route' => request('route')])); });
- Goto config/krayin-vite.php file and add following lines
<?php return [ 'viters' => [ // ... 'google' => [ 'hot_file' => 'google-vite.hot', 'build_directory' => 'google/build', 'package_assets_directory' => 'src/Resources/assets', ], ], ];
- Goto .env file and add following lines
GOOGLE_CLIENT_ID= GOOGLE_CLIENT_SECRET= GOOGLE_REDIRECT_URI="${APP_URL}/google/oauth" GOOGLE_WEBHOOK_URI="${APP_URL}/google/webhook"
- Goto config/services.php file and add following lines
return [ // ... 'google' => [ // Our Google API credentials. 'client_id' => env('GOOGLE_CLIENT_ID'), 'client_secret' => env('GOOGLE_CLIENT_SECRET'), // The URL to redirect to after the OAuth process. 'redirect_uri' => env('GOOGLE_REDIRECT_URI'), // The URL that listens to Google webhook notifications (Part 3). 'webhook_uri' => env('GOOGLE_WEBHOOK_URI'), // Let the user know what we will be using from his Google account. 'scopes' => [ // Getting access to the user's email. \Google_Service_Oauth2::USERINFO_EMAIL, // Managing the user's calendars and events. \Google_Service_Calendar::CALENDAR, ], // Enables automatic token refresh. 'approval_prompt' => 'force', 'access_type' => 'offline', // Enables incremental scopes (useful if in the future we need access to another type of data). 'include_granted_scopes' => true, ], ];
- Goto app/Http/Middleware/VerifyCsrfToken.php file and add following line under $except array
protected $except = [ // ... 'google/webhook', ];
- Goto app/Console/Kernel.php file and update the schedule function with the following lines
protected function schedule(Schedule $schedule) { $schedule->job(new \Webkul\Google\Jobs\PeriodicSynchronizations())->everyFifteenMinutes(); $schedule->job(new \Webkul\Google\Jobs\RefreshWebhookSynchronizations())->daily(); }
5. Clear Cache:
php artisan cache:clear
php artisan config:cache
That's it, now just execute the project on your specified domain.
krayin/krayin-google-integration 适用场景与选型建议
krayin/krayin-google-integration 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 2.32k 次下载、GitHub Stars 达 29, 最近一次更新时间为 2021 年 08 月 25 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 krayin/krayin-google-integration 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 krayin/krayin-google-integration 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 2.32k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 29
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-08-25