Download the PHP package laravel-studio/laravel-google-sheet-integration without Composer
On this page you can find all versions of the php package laravel-studio/laravel-google-sheet-integration. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravel-studio/laravel-google-sheet-integration
More information about laravel-studio/laravel-google-sheet-integration
Files in laravel-studio/laravel-google-sheet-integration
Package laravel-google-sheet-integration
Short Description You can create google sheet by this packages.
License MIT
Informations about the package laravel-google-sheet-integration
laravel-google-sheet-integration
Installation:
-
composer require laravel-studio/laravel-google-sheet-integration
- Add this code under providers array
laravelstudio\laravelgooglesheetintegration\GoogleSheetServiceProvider::class,
Add this under aliases array of config > app.php
'GoogleSheet' => laravelstudio\laravelgooglesheetintegration\facades\googlesheet::class
- You have to add this in $routeMiddleware in Kernal.php
'googleAuth' => \laravelstudio\laravelgooglesheetintegration\middleware\googleAuth::class,
'checkUserAuth' => \laravelstudio\laravelgooglesheetintegration\middleware\checkUserAuth::class,
- Set GOOGLE_SHEET_RETURN_URL key value in .env file like :
GOOGLE_SHEET_RETURN_URL=http://localhost:8000/<your-callback-route>
- Run
composer dump-autoload
- Run
php artisan vendor:publish
- Run
php artisan migrate
Use:
Your google auth config file will be under config > googlesheet.php. Place your auth credentials here.
Packages views will be under resources > views > vendor > googlesheet, make your customization here.
Note: if you are not going to use package’s layout page, then make sure this scripts are included at your main layout or copy from package’s layout page.
Css File:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
<link rel="stylesheet" href="{{ asset('/vendor/googlesheet/css/custom.css') }}">
Js file:
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" ></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js" integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
After including those scripts include @stack('google-drive-scripts') and @stack('auto-auth-script') at end of the script.
Show google sheet auth button
To add google auth button use this in your controller file (make sure that you have looged in user of your application)
return view('laravelgooglesheetintegration::signin');
Save or update google sheet data:
use this facade in controller use GoogleSheet;
then use this code:
GoogleSheet::updatesettings($data);
Here is the sample data format:
Note: if u choose folder then it creates new sheet or if you choose existing file then it will be updated.