PHPackages                             wyattcast44/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. wyattcast44/gsuite

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

wyattcast44/gsuite
==================

Helps manage your GSuite Account from your Laravel application

0.0.1(5y ago)0298MITPHPPHP ^7.1

Since May 26Pushed 5y ago1 watchersCompare

[ Source](https://github.com/WyattCast44/gsuite)[ Packagist](https://packagist.org/packages/wyattcast44/gsuite)[ Docs](https://github.com/wyattcast44/gsuite)[ RSS](/packages/wyattcast44-gsuite/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

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

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

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.***

**UPDATE: This package development has been paused, I would love to continue to build this package, but no longer have a GSuite account and using a personal account was to pricey. I may pick this back up if I can get either a work sponsored GSuite account, or some form of GSuite Dev credits.**

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

[](#installation)

You can install the package via composer:

```
composer require wyattcast44/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)
- [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

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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

Unknown

Total

1

Last Release

2174d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ec1f5d67a8ace8451f50303ed7fc9185a8298b9a38dc4d47c3aeb283255e66d?d=identicon)[wyattcast44](/maintainers/wyattcast44)

---

Top Contributors

[![WyattCast44](https://avatars.githubusercontent.com/u/17957937?v=4)](https://github.com/WyattCast44 "WyattCast44 (134 commits)")

---

Tags

googlegsuitegsuite-accountslaravelgsuitewyattcast44

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M210](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M858](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)[mrmarchone/laravel-auto-crud

Laravel Auto CRUD helps you streamline development and save time.

28711.8k2](/packages/mrmarchone-laravel-auto-crud)

PHPackages © 2026

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