PHPackages                             luciocodeigniter/api-ci4-car-workshop - 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. [API Development](/categories/api)
4. /
5. luciocodeigniter/api-ci4-car-workshop

ActiveProject[API Development](/categories/api)

luciocodeigniter/api-ci4-car-workshop
=====================================

API for creating customers, their cars, their addresses, creating services and employees. Creation of customer vehicle maintenance with Codeigniter 4. The API provides registration and authentication.

v1.0.0(2y ago)4182MITPHPPHP ^7.4 || ^8.0

Since Jan 27Pushed 2y ago2 watchersCompare

[ Source](https://github.com/luciocodeigniter/api-ci4-car-workshop)[ Packagist](https://packagist.org/packages/luciocodeigniter/api-ci4-car-workshop)[ RSS](/packages/luciocodeigniter-api-ci4-car-workshop/feed)WikiDiscussions main Synced 1mo ago

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

API for creating customers, their cars, their addresses, creating services and employees. Creation of customer vehicle maintenance with Codeigniter 4. The API provides registration and authentication.
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#api-for-creating-customers-their-cars-their-addresses-creating-services-and-employees-creation-of-customer-vehicle-maintenance-with-codeigniter-4-the-api-provides-registration-and-authentication)

Features
--------

[](#features)

- Register
- Login
- CRUD Customers
- CRUD Cars customers
- CRUD Address customers
- CRUD Employees
- CRUD Services
- CRUD Maintenance cars
- CRUD Services Maintenance cars association

Server Requirements
-------------------

[](#server-requirements)

- Developed PHP 8.2.7 and Codeigniter 4.4.4
- The following extensions need to be enabled:

1. intl
2. mbstring
3. json

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

[](#installation)

1 - Install the project using composer (requires [Composer](https://getcomposer.org/)):

```
composer create-project luciocodeigniter/api-ci4-car-workshop
```

2 - Rename the `.env-exemple.txt` file to `.env` which can be found in the project root

3 - Place the information in the `.env` file as per the following example:

```
#--------------------------------------------------------------------
# ENVIRONMENT
#--------------------------------------------------------------------

CI_ENVIRONMENT = development

#--------------------------------------------------------------------
# APP
#--------------------------------------------------------------------

app.baseURL = 'https://exemplo.com/'
app.indexPage = ''

#--------------------------------------------------------------------
# DATABASE
#--------------------------------------------------------------------

database.default.hostname = localhost
database.default.database = db-name
database.default.username = db-user
database.default.password = db-password
database.default.DBDriver = MySQLi
database.default.DBPrefix =
database.default.port = 3306

#--------------------------------------------------------------------
# JWT Authenticator
#--------------------------------------------------------------------
authjwt.keys.default.0.secret = oGPvp9lLkgTvcqlVIU3rJE46uJmedapcW3EJ6cr/9gw=
```

Creating and populating tables in the database.
-----------------------------------------------

[](#creating-and-populating-tables-in-the-database)

1 - At the root of the project, open the terminal and run the following command:

```
php spark api:init
```

2 . If you want to reset the database to its original state, simply run the following command in the root of the project:

```
php spark api:reset
```

3 - If you want to change the number of records to be created with seeders, simply change the `TOTAL_STEPS` constant within each file, which can be found in `app\Database\Seeds`:

```
//...

/**
* How many records do you want to create
*/
private const TOTAL_STEPS = 100; //
