PHPackages                             bitsoftsol/laravel-administration - 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. bitsoftsol/laravel-administration

ActiveLibrary

bitsoftsol/laravel-administration
=================================

Laravel administration is the autometically building the crud for web and apis when developer will create model and use the LaravelAdmin or LaravelAdminAPI Traits. Developer can build model and schema also using laravel administration interface.

1.0.7(2y ago)07MITBladePHP ^8.1

Since Oct 24Pushed 2y ago1 watchersCompare

[ Source](https://github.com/hafizSiddiq7675/laravel-administration)[ Packagist](https://packagist.org/packages/bitsoftsol/laravel-administration)[ RSS](/packages/bitsoftsol-laravel-administration/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (4)Versions (8)Used By (0)

Laravel Administration
======================

[](#laravel-administration)

[![Laravel Logo](src/readme-assets/images/laravel_administration_portal.jpg)](src/readme-assets/images/laravel_administration_portal.jpg)[![Total Downloads](https://camo.githubusercontent.com/b0a7ee2f3f0208712ecb1081b9d6fcf05045c10cd6f345abcb924f5512c0d346/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c2f6672616d65776f726b)](https://packagist.org/packages/laravel/framework)[![Latest Stable Version](https://camo.githubusercontent.com/9e6071b5dd1a4a3bcabe3cca9d97a447d030caeb940f2adbd18699bc0b326702/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c2f6672616d65776f726b)](https://packagist.org/packages/laravel/framework)[![License](https://camo.githubusercontent.com/4a64c31c71966d152c876eea1f35e85fbd33d57ddf5754260a41f053aa72c5b2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c61726176656c2f6672616d65776f726b)](https://opensource.org/licenses/MIT)

About Laravel Administration
----------------------------

[](#about-laravel-administration)

Laravel Administration is a powerful package designed to simplify the development of Laravel applications by automating common CRUD (Create, Read, Update, Delete) operations. With this package, you can create models effortlessly and enjoy automatic route generation, views, and controller logic.

Features
--------

[](#features)

- Automatic CRUD operations.
- RESTful API generation.
- Easy-to-use schema builder for advanced customization.
- User authentication and role management.
- MIT-licensed open-source software.

Installation Guide
------------------

[](#installation-guide)

To get started with Laravel Administration, follow these steps:

1. **Create a Laravel Project**:

    ```
    composer create-project laravel/laravel LaravelAdministration
    ```
2. **Install LaravelAdministration Package**:

    Install the LaravelAdministration package using Composer:

    ```
    composer require bitsoftsol/laravel-administration
    ```
3. **Add LaravelAdminServiceProvider**:

    Open the `config/app.php` file and add the LaravelAdministration service provider to the `providers` array:

    ```
    'providers' => [
        // ...
        Bitsoftsol\LaravelAdministration\LaravelAdminServiceProvider::class,
    ],
    ```
4. **Publish Vendor Files**:

    Run the following Artisan command to publish vendor files: Select the `LaravelAdminServiceProvider` when prompted.

    ```
    php artisan vendor:publish
    ```
5. **Install Frontend Assets**:

    Run the following commands to build assets:

    ```
    npm install
    npm run dev
    ```
6. **Set Database Connection**:

    Configure your database connection by setting the database name in your `.env` file.
7. **Run Migrations**:

    Execute the database migrations and seed data:

    ```
    php artisan migrate --seed
    ```
8. **Enable Authentication Routes**:

    Add the following line inside your `routes/web.php` file:

    ```
    Auth::routes();
    ```
9. **Serve Your Project**:

    Serve your Laravel project:

    ```
    php artisan serve
    ```
10. **Access Laravel Administration**:

    Open your browser and access the URL `(host)/admin` (e.g., `http://127.0.0.1:8000/admin`).
11. **Login Credentials**:

    Use the following credentials to log in:

    - Username:
    - Password: bitsoftsol123
12. **Create a Superuser**:

    To create a superuser for your Laravel application, follow these steps:

    - Open your terminal and navigate to the root directory of your Laravel project.
    - Run the following command:

    ```
    php artisan createsuperuser
    ```

The `createsuperuser` command will prompt you to provide the following information:

- **Username**: Choose a unique username for the superuser.
- **Email**: Enter the email address associated with the superuser.
- **Password**: Set a secure password for the superuser.
- **Confirm Password**: Re-enter the password for confirmation.

- After successfully providing the required information, the superuser account will be created.
- You can now use the provided username and password to log in as the superuser and access the admin privileges.
- Creating a superuser allows you to manage and control various aspects of your Laravel application with elevated permissions.

12. **Congratulations!**:

    If you can log in and access the Laravel Administration dashboard, congratulations! You have successfully installed Laravel Administration.

Usage Guide
-----------

[](#usage-guide)

In this section, we will guide you through performing automatic CRUD operations for the `Seller` model using Laravel Administration.

1. **Generate the Seller Model:**

    Run the following Artisan command to create the `Seller` model along with its migration file:

    ```
    php artisan make:model Seller -m
    ```
2. **Define Seller Table Fields:**

    Inside the generated migration file, define the `Seller` table fields, including `name`, `email`, `city`, `country`, and `profile_image`.
3. **Add LaravelAdmin and LaravelAdminAPI Traits:**

    Inside the generated migration file, define the `Seller` table fields, including `name`, `email`, `city`, `country`, and `profile_image`. Enhance the functionality of your `Seller` model by importing the `LaravelAdmin` and `LaravelAdminAPI` traits.

    - Import the `LaravelAdmin` Trait at the top of the `Seller` model class:

        ```
        use Bitsoftsol\LaravelAdministration\Traits\LaravelAdmin;
        ```
    - Import the **`LaravelAdminAPI`** Trait on top of the **`Seller`** model class:

        ```
        use Bitsoftsol\LaravelAdministration\Traits\LaravelAdminAPI;
        ```
    - Add these two lines inside the `Seller` model class to include the traits:

        ```
        use LaravelAdmin;
        use LaravelAdminAPI;
        ```
4. **Define Fillable Fields:**

    In the `Seller` model class, ensure that you add the field names to the **`fillable`** array:

    ```
    protected $fillable = [ "name", "email", "city", "country", "profile_image" ];
    ```
5. **Run Migrations:**

    Execute the migration to create the **`sellers`** table in your database:

    ```
    php artisan migrate
    ```
6. **Access the Admin Panel:**

    Open your web browser and visit **`http://127.0.0.1:8000/admin`**. This is where you can manage your sellers with CRUD operations.
7. **Congratulations!**

    You are now able to perform CRUD operations on the **`Seller`** model without the need for extensive coding.

    This guide empowers you to efficiently manage your sellers in your Laravel application.

Postman Guide
-------------

[](#postman-guide)

To use CRUD APIs for the `Seller` model, follow these steps:

1. **Import the Postman Collection:**

    Import the provided Postman collection to access the CRUD APIs efficiently. You can download it from here: [Postman Collection - Laravel Administration](src/readme-assets/postman/Laravel-Administration.postman_collection.json).
2. **Import the Environment Variables:**

    Import the environment variables configuration into Postman for seamless testing. You can download it from here: [Postman Environment - Laravel Administration](src/readme-assets/postman/Laravel-Administration.postman_environment.json).
3. **Set the Host Variable:**

    In Postman, configure the `host` variable to match your application's URL, typically something like `http://127.0.0.1:8000`.
4. **Access the Login API:**

    Make a POST request to the following API endpoint to log in:

    - **API Endpoint:** `(host)/api/admin/login`
    - **Credentials:**
        - **Username:**
        - **Password:** bitsoft123

    After a successful login, you will receive an authentication token.
5. **Set the Token Environment Variable:**

    Once you receive the authentication token upon login, set it as the `(token)` environment variable in Postman for subsequent API requests.
6. **Fetch the Model ID:**

    Retrieve the `model_id` for the `Seller` model from the following API endpoint:

    - **API Endpoint:** `{{host}}/api/admin/crud/models`

    Set the obtained `model_id` as the `(model_id)` environment variable in Postman.
7. **Access CRUD APIs for the Seller Model:**

    You can now access the CRUD APIs for the `Seller` model using the environment variables:

    - **Listing of Seller API:** `{{host}}/api/admin/crud/{{model_id}}`
    - **Detail of Seller API:** `{{host}}/api/admin/crud/{{model_id}}/2` (where 2 represents the seller's ID)
    - **Store Seller API:** `{{host}}/api/admin/crud/{{model_id}}`
    - **Update Seller API:** `{{host}}/api/admin/crud/{{model_id}}` (include the seller's ID in the form-data within the body tab of Postman)
    - **Delete Seller API:** `{{host}}/api/admin/crud/{{model_id}}/3` (where 3 represents the seller's ID)
8. **Congratulations!**

    You can now perform CRUD operations on the `Seller` model without the need for additional coding. Enjoy the convenience of Laravel Administration for managing your sellers efficiently.

Schema Builder
--------------

[](#schema-builder)

In the Laravel Administration application, you can effortlessly create the `Seller` model and its associated migration file using the Schema Builder. Here's how:

1. Access the Schema Builder:

    - Navigate to `(host)/admin/crud-schema/create` in your web browser, replacing `(host)` with your application's URL.
2. Enter the Model Name:

    - On the provided page, input 'Seller' as the model name.
3. Submission:

    - Click the 'Submit' button to initiate the generation of the `Seller` model and its corresponding migration file in your project.

Upon successful creation, you'll be redirected to the Schema Builder list. Here, you can find the 'Seller' model in the list.

### Managing Your Schema

[](#managing-your-schema)

- **Deleting Schema:**

    - To remove the 'Seller' model and its migration file from your project, click the 'Delete' button.
- **Defining Schema Fields:**

    - By clicking the 'Create Schema' button, you'll access a view where you can define the fields of the 'Seller' migration, including the ability to add more fields. If you wish to include image fields in the migration, ensure you suffix column names with '\_image.'
- **LaravelAdmin Trait:**

    - On the 'Create Schema' view, you can select whether to use the 'LaravelAdmin' Trait by ticking the checkbox. If chosen, the trait will be automatically imported when defining seller field names.

### Editing Schema

[](#editing-schema)

After creating the schema, you'll find an 'Open Editor' button in the 'Seller' row within the Schema Builder listing. Clicking this button will redirect you to a Visual Code Editor view, allowing you to edit the 'Seller' migration and model files.

- **LaravelAdminAPI and LaravelAdmin Traits:**

    - In the live editor, you can use the 'LaravelAdminAPI' Trait if required, and include the 'LaravelAdmin' Trait if desired. These traits will enable you to access CRUD routes for the Seller model, both through web and API interfaces.
- **Defining Fillable Fields:**

    - Set the fields of the 'sellers' table in the `fillable` array. These fields will be displayed in the Seller listing view.

### Migration

[](#migration)

After editing the model and migration files, you can click on the 'Migrate' button to apply the changes to your table. Once the seller table is migrated, you will no longer be able to open the editor or perform migrations, but you can still delete.

### CRUD Operations

[](#crud-operations)

- **LaravelAdmin Trait:**

    - If you have included the 'LaravelAdmin' Trait in your Seller model, you can access Seller CRUD operations via the 'CRUD' tab on the web interface.
- **LaravelAdminAPI Trait:**

    - If you have included the 'LaravelAdminAPI' Trait in your Seller model, you can access Seller CRUD operation APIs using the Postman Collection.

**Congratulations!**, you've now completed the LaravelAdministration documentation. You're all set to make the most of this powerful tool for Laravel development. Happy coding!

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

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.

###  Release Activity

Cadence

Every ~0 days

Total

7

Last Release

927d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4de51770e8f177b9df6dabac90967eec870b695b08d533cb65285c7cf6b94e2f?d=identicon)[hafizSiddiq7675](/maintainers/hafizSiddiq7675)

### Embed Badge

![Health badge](/badges/bitsoftsol-laravel-administration/health.svg)

```
[![Health](https://phpackages.com/badges/bitsoftsol-laravel-administration/health.svg)](https://phpackages.com/packages/bitsoftsol-laravel-administration)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[krayin/laravel-crm

Krayin CRM

22.0k32.8k1](/packages/krayin-laravel-crm)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[sebastienheyd/boilerplate

Laravel Boilerplate based on AdminLTE 3 with blade components, user management, roles, permissions, logs viewer, ...

28618.2k3](/packages/sebastienheyd-boilerplate)[spatie/mailcoach

Self-host Mailcoach

4007.0k](/packages/spatie-mailcoach)[eveseat/web

SeAT Web Interface

2723.2k135](/packages/eveseat-web)

PHPackages © 2026

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