PHPackages                             brickservers/gsuite - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. brickservers/gsuite

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

brickservers/gsuite
===================

Modern Laravel package for managing Google Workspace (formerly G Suite) with support for Directory API, Classroom, Calendar, Gmail, and Drive APIs

v2.1(1mo ago)33831MITPHPPHP &gt;=8.2

Since May 26Pushed 5y agoCompare

[ Source](https://github.com/wallacemyem/gsuite)[ Packagist](https://packagist.org/packages/brickservers/gsuite)[ Docs](https://github.com/wallacemyem/gsuite)[ RSS](/packages/brickservers-gsuite/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (13)Versions (7)Used By (0)

G-Suite Admin SDK Wrapper
=========================

[](#g-suite-admin-sdk-wrapper)

[![Latest Version on Packagist](https://camo.githubusercontent.com/62e6be515b5168a149963dbd4ca94107c970de1728ff7c1118de18f9c703c6b7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f627269636b736572766572732f6773756974652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/brickservers/gsuite)[![Total Downloads](https://camo.githubusercontent.com/1fa455f6dcc08bd6521d64d8ca0b41dd46c346d1476915ad25c6334576855fde/68747470733a2f2f706f7365722e707567782e6f72672f627269636b736572766572732f6773756974652f646f776e6c6f616473)](//packagist.org/packages/brickservers/gsuite)

This is a wrapper around the [Google Admin SDK](https://developers.google.com/admin-sdk/). It allows you to manage your G-Suite account in your Laravel application. There is an [example application](https://github.com/WyattCast44/gsuite-package-example) if you'd like to check that out.

***Warning: under active development, use at your own risk. A version will be tagged when ready for testing.***

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require brickservers/gsuite
```

Once the install has finished, publish the configuration file

```
php artisan vendor:publish
```

### Configuration

[](#configuration)

1. Set your account to impersonate

```
// .env
GOOGLE_SERVICE_ACCOUNT=email@domain.com
```

2. Update the `credentials_path`, ensure you add your credentials file to your `.gitignore`. You can download this file from the [Google admin console](https://admin.google.com)

```
'credentials_path' => storage_path('credentials.json'),
```

3. Set your domain

```
// .env
GSUITE_DOMAIN=example.com
```

4. Change cache settings as desired in config file
5. Add any accounts, alias, or groups that you want to disable the ability to delete. Used to ensure no one can delete your service account. You can still delete them manually via the G-Suite Administrator interface.

Usage
-----

[](#usage)

### G-Suite Account Management

[](#g-suite-account-management)

```
// Create a new G-Suite account
GSuite::accounts()->create([
    [
        'first_name' => 'John',
        'last_name' => 'Doe',
    ],
    'email' => 'john.doe@email.com',
    'default_password' => 'password'
]);

// Get a G-Suite account
GSuite::accounts()->get('john.doe@example.com');

// Get a collection of all G-Suite accounts in your domain
GSuite::accounts()->all();

// Delete a G-Suite account
GSuite::accounts()->delete('john.doe@example.com');

// Suspend a G-Suite account
GSuite::accounts()->suspend('john.doe@example.com');

// Add an alias to a G-Suite account
GSuite::accounts()->alias('john.doe@example.com', 'support@example.com');
```

### G-Suite Group Management

[](#g-suite-group-management)

```
// Create a new G-Suite group
GSuite::groups()->create('group.email@example.com', 'Group Name', 'Group description');

// Get a G-Suite group
GSuite::groups()->get('group.email@example.com');

// Get a collection of all G-Suite groups in your domain
GSuite::groups()->all();

// Delete a G-Suite group
GSuite::groups()->delete('group.example@example.com');

// Add a member to a G-Suite group
GSuite::groups()->addMember('group.email@example.com', 'john.doe@example.com');
```

### Caching

[](#caching)

By default `accounts` and `groups` are cached. If you choose not to cache results, request times will be lengthy. The cache will automatically flush when you delete, insert, or update resources. You can flush the cache at any time, see examples below.

```
// Flush accounts and groups cache
GSuite::flushCache();

// Flush only accounts cache
GSuite::accounts()->flushCache();

// Flush only groups cache
GSuite::groups()->flushCache();

// Via the CLI
php artisan gsuite:flush-cache
```

### Other Resources

[](#other-resources)

You can use the `GoogleServicesClient` class to get api clients for other google services, for example let's say you wanted to manage your domain's [organizational units](https://developers.google.com/admin-sdk/directory/v1/guides/manage-org-units).

You can get a api client for the org units like so:

```
$client = GSuiteServicesClient::getService('orgunit');
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Wyatt](https://github.com/wyattcast44) #first started the package
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

Laravel Package Boilerplate
---------------------------

[](#laravel-package-boilerplate)

This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance51

Moderate activity, may be stable

Popularity17

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 95% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~710 days

Total

4

Last Release

48d ago

Major Versions

0.0.1 → v1.12020-05-26

v1.1 → 2.02026-03-27

PHP version history (2 changes)0.0.1PHP ^7.1

2.0PHP &gt;=8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cbf2e4cfd63a6fd6d6ec7a503a022d46ad6b94ee11c329f93203cc855ba61cd?d=identicon)[wallacemyem](/maintainers/wallacemyem)

---

Top Contributors

[![WyattCast44](https://avatars.githubusercontent.com/u/17957937?v=4)](https://github.com/WyattCast44 "WyattCast44 (132 commits)")[![wallacemyem](https://avatars.githubusercontent.com/u/32508088?v=4)](https://github.com/wallacemyem "wallacemyem (6 commits)")[![felabrecque](https://avatars.githubusercontent.com/u/165329484?v=4)](https://github.com/felabrecque "felabrecque (1 commits)")

---

Tags

laravelgsuiteGmail APIbrickserversgoogle-workspaceadmin-sdkdirectory-apiclassroom-apicalendar-apidrive-api

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/brickservers-gsuite/health.svg)

```
[![Health](https://phpackages.com/badges/brickservers-gsuite/health.svg)](https://phpackages.com/packages/brickservers-gsuite)
```

###  Alternatives

[spatie/laravel-livewire-wizard

Build wizards using Livewire

4061.0M4](/packages/spatie-laravel-livewire-wizard)[tonysm/importmap-laravel

Use ESM with importmap to manage modern JavaScript in Laravel without transpiling or bundling.

148399.8k1](/packages/tonysm-importmap-laravel)[bensampo/laravel-embed

Painless responsive embeds for videos, slideshows and more.

142146.8k](/packages/bensampo-laravel-embed)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[dragon-code/pretty-routes

Pretty Routes for Laravel

10058.7k4](/packages/dragon-code-pretty-routes)[laracraft-tech/laravel-useful-additions

A collection of useful Laravel additions!

58109.4k](/packages/laracraft-tech-laravel-useful-additions)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
