PHPackages                             saeed/custom-api - 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. saeed/custom-api

ActiveLibrary[API Development](/categories/api)

saeed/custom-api
================

Package for make restfull api project

095PHP

Since Jan 13Pushed 1y ago1 watchersCompare

[ Source](https://github.com/saeed-mirjalili/ApiRestfull)[ Packagist](https://packagist.org/packages/saeed/custom-api)[ RSS](/packages/saeed-custom-api/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Installation Instructions for Saeed Custom API
==============================================

[](#installation-instructions-for-saeed-custom-api)

To install and set up the Saeed Custom API package, please follow the steps below:

---

Step 1: Install the Package
---------------------------

[](#step-1-install-the-package)

You can install the package using Composer with the following command:

```
 composer require saeed/custom-api:dev-main
```

---

Step 2: Autoload Configuration
------------------------------

[](#step-2-autoload-configuration)

In your composer.json file, under the autoload section, add the following entry for PSR-4 autoloading:

```
"autoload": {
  "psr-4": {
  //...
    "Saeed\\CustomApi\\": "packages/saeed/customApi/src/"
  }
}
```

Run the following command to update the autoloader:

```
composer dump-autoload
```

---

Step 3: Service Provider Registration
-------------------------------------

[](#step-3-service-provider-registration)

Next, you need to register the service provider in your application's configuration. Open the config/app.php file and add the provider to the providers array:

```
'providers' => [
   // Other service providers...
    \Saeed\CustomApi\CustomApiServiceProvider::class,
],
```

---

Step 4: Creating Form Requests and Services
-------------------------------------------

[](#step-4-creating-form-requests-and-services)

You can create form requests and logical services using the following Artisan commands:

### Create API Request

[](#create-api-request)

To create a form request, run:

```
php artisan make:apiRequest {name}
```

### Create Logic Service

[](#create-logic-service)

To create a logic service, use:

```
  php artisan make:apiService {name}
```

---

Step 5: Controller Setup
------------------------

[](#step-5-controller-setup)

In your controller, you can inject the service as follows:

```
  public function __construct(private Name $name) {}
```

---

Step 6: Using the Logic Service
-------------------------------

[](#step-6-using-the-logic-service)

You can use the logic service like this:

```
  $result = $this->testService->showTests();
```

---

Step 7: Using the API Response
------------------------------

[](#step-7-using-the-api-response)

To format your API response, use the following code:

```
    return ApiResponse::withMessage('Your message here')
    ->withData(TestResource::collection($result->data))
    ->build()
    ->apiResponse();
```

---

Conclusion
----------

[](#conclusion)

These instructions should help you get started with the Saeed Custom API package. If you have any questions or issues, feel free to reach out for support!

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c85fc4be96d107ee40ae69fe5e692d1616513c19a4dce40ad0a583de048ac5f?d=identicon)[saeed-mirjalili](/maintainers/saeed-mirjalili)

---

Top Contributors

[![saeed-mirjalili](https://avatars.githubusercontent.com/u/154972495?v=4)](https://github.com/saeed-mirjalili "saeed-mirjalili (4 commits)")

### Embed Badge

![Health badge](/badges/saeed-custom-api/health.svg)

```
[![Health](https://phpackages.com/badges/saeed-custom-api/health.svg)](https://phpackages.com/packages/saeed-custom-api)
```

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[facebook/php-business-sdk

PHP SDK for Facebook Business

90821.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

74513.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

265103.1M454](/packages/google-gax)[google/common-protos

Google API Common Protos for PHP

173103.7M50](/packages/google-common-protos)

PHPackages © 2026

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