Package Data | |
---|---|
Maintainer Username: | anhmantk |
Maintainer Contact: | man.nv@kayac.vn (Ha Anh Man) |
Package Create Date: | 2017-01-19 |
Package Last Update: | 2018-07-24 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-14 15:12:35 |
Package Statistics | |
---|---|
Total Downloads: | 260 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
Lấy dữ liệu từ google sheet
Run
composer require kayac/sheet:1.6.x@dev
Add service provider into config/app.php file.
Kayac\Sheet\CallRouteServiceProvider::class
Run composer update
publish kayacsheet.php to config folder
php artisan vendor:publish --provider="Kayac\Sheet\CallRouteServiceProvider" --tag=config
Tạo controller bất kỳ và
<?php
namespace App\Http\Controllers;
use Illuminate\Routing\Router;
use Kayac\Sheet\SheetReader;
class MasterDataController extends MyController
{
function __construct(Router $router)
{
parent::__construct($router);
}
public function index() {
$sheet = new SheetReader();
$sheet->generateKey();
}
}
Chạy lệnh sau để tạo file credentials với google
php artisan route:call --uri=/master-data
##Author Hà Anh Mận
##Document Xem thêm cách dùng Google Sheet ở đây https://developers.google.com/sheets/api/quickstart/php