Download the PHP package coloredcow/laravel-gsuite without Composer

On this page you can find all versions of the php package coloredcow/laravel-gsuite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-gsuite

Laravel GSuite

A Laravel package to setup Google OAuth and GSuite Admin SDK.

Installation

You can install the package using composer

Publish the configurations

Setting up Google Oauth

Update your .env file with the Google OAuth 2.0 credentials

NOTE: If you wish to restrict users to your organization's domain, add to your .env

Inside your app/Http/Controllers/Auth/LoginController.php, use the package trait GSuiteLogin

That's it! Go to your_app_url/auth/google and use your Google email to login.

Setting up GSuite Admin Service

In your .env file, add the following credentials:

To know more about service account and steps to get one, visit the official Google Documentation.

NOTE: Make sure you enable Domain-wide Delegation when creating the service account for your project.

You can now use various services provided by the package. For example, if you want to fetch a user details, you can use the GSuiteUserService facade.

Enabling multitenancy

There are some additional steps required in case your application supports multitenancy.

Set multitenancy to true in your config/gsuite.php

The default value for tenant connection is tenant. If you're using a different name for tenant connection, update config/gsuite.php

Since you'll have multiple tenants, and you may need different GSuite API credentials for each of them, the package will create a table in each tenant database. This table will store the required gsuite credentials.

Publish the tenant specific migrations using the following command. This will publish the migrations into database/migrations/tenant directory.

Now, create your tenant databases.

NOTE: If you already have existing tenants, you may need to recreate those tenant databases. You may lose some data if not done carefully.

In every tenant database, you need to define the application credentials and service account impersonate user. You can add a seeder to your multitenancy implementation so that it runs everytime a new tenant database is created.

Your gsuite_configurations table should look this

id key value created_at updated_at
1 application_credentials full_path_to_credentials.json 2018-06-06 16:00:00 2018-06-06 16:00:00
2 service_account_impersonate [email protected] 2018-06-06 16:00:00 2018-06-06 16:00:00

More multitenancy configurations

If you prefer to have a different name for the gsuite_configurations table, update config/gsuite.php

If you prefer to override the package's GSuiteConfiguration model, create a custom model that must implement the ColoredCow\LaravelGSuite\Contracts\Tenant\GSuiteConfiguration contract. Then, update your config/gsuite.php and replace the default model with the new model.


All versions of laravel-gsuite with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
laravel/socialite Version ^3.0
google/auth Version ^1.3
google/apiclient Version ^2.2
doctrine/dbal Version ^2.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package coloredcow/laravel-gsuite contains the following files

Loading the files please wait ....