Download the PHP package brickservers/gsuite without Composer
On this page you can find all versions of the php package brickservers/gsuite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download brickservers/gsuite
More information about brickservers/gsuite
Files in brickservers/gsuite
Package gsuite
Short Description Modern Laravel package for managing Google Workspace (formerly G Suite) with support for Directory API, Classroom, Calendar, Gmail, and Drive APIs
License MIT
Homepage https://github.com/wallacemyem/gsuite
Informations about the package gsuite
Google Workspace SDK for Laravel
A modern, fully-featured Laravel package for managing Google Workspace (formerly G Suite) using the latest Google Admin SDK API. Supports user management, group management, directory operations, and more.
Sponsor
Support the development of this package:
Features
- ✅ Modern PHP 8.2+ - Uses latest language features (readonly types, enums, named arguments)
- ✅ User Management - Create, read, update, delete, suspend, and manage user accounts
- ✅ Group Management - Full group CRUD operations and member management
- ✅ Directory API - Complete access to the Google Directory API
- ✅ Type-Safe DTOs - Data transfer objects for type safety
- ✅ Comprehensive Error Handling - Custom exceptions with detailed error information
- ✅ Logging Support - Built-in PSR-3 logging for all operations
- ✅ Fluent Interface - Simple, clean API for all operations
- ✅ Laravel 10-13 Support - Compatible with all modern Laravel versions
- ✅ Extensible - Easy to extend with custom services
Requirements
- PHP 8.2 or higher
- Laravel 10.0 or higher
- Google Workspace account with admin access
- Google Cloud Project with Admin SDK API enabled
Installation
Publish Configuration
This will publish the configuration file to config/google-workspace.php.
Configuration
1. Set Up Google Cloud Project
- Go to Google Cloud Console
- Create a new project
- Enable the "Google Admin SDK API"
- Create a service account
- Download the credentials JSON file
- Move the file to
storage/credentials.json(or configure the path)
2. Configure Environment Variables
Add these to your .env file:
3. Update Configuration
Edit config/google-workspace.php to customize settings:
Usage
Basic Setup
User Management
Create a User
Get a User
List Users
Update a User
Delete a User
Suspend/Unsuspend a User
Manage User Aliases
Group Management
Create a Group
Get a Group
List Groups
Update a Group
Delete a Group
Manage Group Members
Error Handling
The package throws GoogleWorkspaceException for all API errors:
Exception Types
GoogleWorkspaceException::validationError()- Validation failedGoogleWorkspaceException::resourceNotFound()- Resource doesn't existGoogleWorkspaceException::undeletableResource()- Protected resourceGoogleWorkspaceException::apiError()- General API errorGoogleWorkspaceException::accessDenied()- Insufficient permissionsGoogleWorkspaceException::missingCredentials()- Credentials not configured
Data Transfer Objects (DTOs)
UserDTO
GroupDTO
Enums
UserProjection
UserViewType
ApiScope
Predefined OAuth scopes for different APIs:
Migration from Old Package
If you're upgrading from wyattcast44/gsuite or brickservers/gsuite:
Changes Summary
- Namespace Changed:
Wyattcast44\GSuite→BrickServers\GoogleWorkspace - New DTOs: Use
UserDTOandGroupDTOinstead of raw arrays - Type-Safe: All methods now have proper type hints
- Better Errors: Custom exception types for better error handling
- Modern PHP: Uses PHP 8.2+ features (enums, readonly types, named arguments)
Migration Steps
Before (Old Package)
After (New Package)
Testing
Run with coverage:
Debugging
Enable logging in your .env:
View logs in storage/logs/laravel.log to see all API operations.
Supported APIs
- ✅ Google Admin Directory API
- ✅ Google Classroom API (ready)
- ✅ Google Calendar API (ready)
- ✅ Google Gmail API (ready)
- ✅ Google Drive API (ready)
Security Best Practices
- Never commit credentials.json - Add to
.gitignore - Use environment variables - Store sensitive data in
.env - Limit API scopes - Only request scopes your app needs
- Enable logging - Monitor all API operations
- Use protected resources - Add critical accounts/groups to
undeletablelist - Validate input - DTOs provide validation out of the box
Performance Tips
- Use pagination - Always set
maxResultsparameter - Cache results - Store frequently accessed data
- Batch operations - Group multiple API calls when possible
- Enable logging selectively - Disable in production if not needed
Contributing
Contributions are welcome! Please follow Laravel coding standards and include tests.
Changelog
See CHANGELOG.md for version history and breaking changes.
License
The MIT License (MIT). Please see License File for more information.
Support
For issues, questions, or suggestions, please open an issue on GitHub.
Credits
- Modern rewrite by BrickServers Team
- Original package by Wyatt Cast
- Built with the Google Admin SDK
All versions of gsuite with dependencies
google/apiclient Version ^2.19
illuminate/contracts Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
psr/log Version ^1.1|^2.0|^3.0