kayac/sheet

Google sheet with laravel

Installs: 261

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/kayac/sheet

1.2 2018-07-24 22:17 UTC

This package is not auto-updated.

Last update: 2025-09-28 06:06:08 UTC


README

Lấy dữ liệu từ google sheet

Installation

  1. Run

    composer require kayac/sheet:1.6.x@dev
    
  2. Add service provider into config/app.php file.

    Kayac\Sheet\CallRouteServiceProvider::class
  3. Run composer update

  4. publish kayacsheet.php to config folder

php artisan vendor:publish --provider="Kayac\Sheet\CallRouteServiceProvider" --tag=config

Commands

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