Cole is a standard Laravel 9 application. If you have PHP 8.0+, Composer, and a MySQL database available, you can have a fully working API running locally in under five minutes. The steps below walk from a fresh clone to a verified, authenticated request against the running server.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/iamalexis689725/cole/llms.txt
Use this file to discover all available pages before exploring further.
Clone the repository and install dependencies
Clone Cole from GitHub, then use Composer to install all PHP dependencies. Afterward, copy the example environment file and generate your application key.
composer install will pull in Laravel 9, Sanctum, Spatie Permission, and Guzzle. Ensure your PHP version is 8.0.2 or higher before running the command.Configure your .env file
Open
.env in your editor and update the database connection block and APP_URL to match your local environment. The most important values are shown below.Run database migrations
Apply all migrations to create the Cole schema, including the users table, Sanctum personal access tokens table, and Spatie Permission tables.A successful run ends with output similar to:
Seed roles and modules
Cole ships with two seeders that must be run before any users can be registered. Or run both at once using the root After seeding, the
RoleSeeder creates the five built-in roles; ModuleSeeder creates the available school modules.Run them individually:DatabaseSeeder, which calls them in the correct order:roles table will contain exactly these five records:name |
|---|
super-admin |
director |
profesor |
estudiante |
padre |
Register a super-admin and make your first request
Start the development server, register a Register a super-admin:The response includes your Bearer token:Make your first authenticated request:A
super-admin user, and use the returned token to call GET /api/auth/me.Start the server:200 OK response confirms that your token is valid and the API is working correctly. You’re ready to explore the rest of the Cole endpoints.