PHPackages                             auto-api/auto-api-scwv - 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. auto-api/auto-api-scwv

ActivePackage[API Development](/categories/api)

auto-api/auto-api-scwv
======================

Laravel Auto API Single Controller Web View This package that you activate first to learn the secrets of the API, you can write one path and one controller then return the view to the web and from the same controller to restore and re-register the json. This package will write one source code for the web and the API at the same time, you do not need to write one source code for the web and another for the API This package saves you from writing the source code because you will write one source code that works on the web and works on applications, all of this with one source code only

01PHP

Since Jan 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/eslam147/auto-api-scwv)[ Packagist](https://packagist.org/packages/auto-api/auto-api-scwv)[ RSS](/packages/auto-api-auto-api-scwv/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

If no version is specified, it defaults to `http://your-domain.com/api`.

---

**Documention**
---------------

[](#documention)

Laravel Auto API Single Controller Web View
===========================================

[](#laravel-auto-api-single-controller-web-view)

**Overview**
------------

[](#overview)

This package when that you installed that it can write one path and one controller then return the view to the web and from the same controller to restore and re-register the json. This package will write one source code for the web and the API at the same time, you do not need to write one source code for the web and another for the API and you don't need to write any route in file api.php and you don't need to write any custom controller for api. This package saves you from writing the source code because you will write single source code that works on the web and works on applications by one source code only

\*\* installtion \*\*
---------------------

[](#-installtion-)

    ```

        composer require auto-api/auto-api-scwv

```

\*\* Settings \*\*
------------------

[](#-settings-)

if you want to set version for api

you can do this by .env

    ```

        API_VERSION= v1.0

```

if you want to rename key api

in .env file you can rename key api

    ```

        API_NAME= new_name

```

if you want to change auth type api

in .env file you can change auth

    ```

        AUTH_API= auth:api

```

if you want to enable or disable clear cache route by default is true

in .env file you can do this

    ```

        CLEAR_CACHE_ON_BOOT= false

```

if you want to gitignore any guard

it is simplly add this to auth.php file

    ```

        'gitignore' => [
            'api',
            'sanctum',
            'admin',
        ]

```

### **How To Use?**

[](#how-to-use)

In controller

```

namespace App\Http\Controllers;

class ExampleController extends Controller
{
    public function show()
    {
        return render('example'); // Use `render` instead of `view`
    }

}

```

### **In blade File**

[](#in-blade-file)

    ```

    href="{{ routeApi('about') }}
    href="{{ routeApi('product', ['id' => $id]) }}

```

    ```

       action="{{ routeApi('login') }}"

```

### **Custom Artisan Command Example**

[](#custom-artisan-command-example)

Create a new API request class with the command:

    ```
php artisan make:requestapi CreateUserRequest
```

This generates the file in the `app/Http/Requests` directory, optimized for API validation.

---

**Contribution**
----------------

[](#contribution)

Feel free to contribute by submitting a pull request or reporting issues. All contributions are welcome and appreciated!

---

**License**
-----------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE).

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity1

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/242e9a9bc78cb095141b8322f4552ed95f3ae580dd138274ce4a88de5ae446a4?d=identicon)[eslam147](/maintainers/eslam147)

---

Top Contributors

[![eslam147](https://avatars.githubusercontent.com/u/77081867?v=4)](https://github.com/eslam147 "eslam147 (10 commits)")

### Embed Badge

![Health badge](/badges/auto-api-auto-api-scwv/health.svg)

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

###  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)
