PHPackages                             neeraj/catalyst-starterkit-restapi - 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. [Framework](/categories/framework)
4. /
5. neeraj/catalyst-starterkit-restapi

ActiveLibrary[Framework](/categories/framework)

neeraj/catalyst-starterkit-restapi
==================================

Laravel Starter Kit with Authentication and CRUD Repository

1.1(1y ago)52MITPHPPHP &gt;=8.0

Since Jan 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/NeeRaj556/starter-kit-laravel-package)[ Packagist](https://packagist.org/packages/neeraj/catalyst-starterkit-restapi)[ RSS](/packages/neeraj-catalyst-starterkit-restapi/feed)WikiDiscussions main Synced 1mo ago

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

Laravel Starter Kit - Authentication and CRUD Repository
========================================================

[](#laravel-starter-kit---authentication-and-crud-repository)

A ready-to-use Laravel starter kit featuring authentication and a base CRUD repository. This package is designed to save time and effort by providing a robust foundation for any Laravel-based API application.

---

Features
--------

[](#features)

### **Authentication**

[](#authentication)

- JWT-based authentication for secure API token management.

### **Base CRUD Repository**

[](#base-crud-repository)

- Centralized CRUD repository pattern to minimize code redundancy and enhance maintainability.

### **Image Uploads**

[](#image-uploads)

- Handles image uploads and storage with automatic naming and folder organization.
- Supports image uploads for all CRUD features, with files saved according to the model ID.

### **API Ready**

[](#api-ready)

- Pre-configured routes and controller logic to quickly set up API endpoints.

### **Flexible Parameters**

[](#flexible-parameters)

- No need to send empty arrays (e.g., `[]`) for parameters unless required.
- Middleware adjusts functionality based on the presence of data in the parameters.

---

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

[](#installation)

Install the package using Composer:

```
composer require neeraj/catalyst-starterkit-restapi
```

```
php artisan jwt:secret
```

```
php artisan migrate
```

---

Usage
-----

[](#usage)

### **Controllers**

[](#controllers)

- Example `ProductController` is provided with full CRUD functionality.
- Extend the `CrudRepository` to add logic for other models.
- Ensure the image folder is updated dynamically using the `$folder` variable based on model requirements.

### **Routes**

[](#routes)

Pre-configured routes for authentication and product management:

```
// routes/api.php
Route::apiResource('products', ProductController::class);
```

To update a product using a PUT request:

```
localhost:8000/api/products/1?_method=PUT
```

### **Requests**

[](#requests)

Custom request classes for validation:

- `StoreProductRequest`
- `UpdateProductRequest`

### **Environment Variables**

[](#environment-variables)

- Set pagination count with `PAGINATE` in `.env`.
- Modify as per your requirements.

---

Folder Structure
----------------

[](#folder-structure)

```
app/
├── Http/
│   ├── Controllers/
│   │   └── ProductController.php
│   ├── Requests/
│   │   ├── StoreProductRequest.php
│   │   └── UpdateProductRequest.php
├── Models/
│   └── Product.php
├── Repositories/
│   ├── BaseRepository.php
│   └── CrudRepository.php

```

---

Image Handling
--------------

[](#image-handling)

- Images are stored in folders named according to the model ID.
- To allow for multiple images, use the `$file` array to specify fields for the images.
- Dynamically change the `$folder` variable for different models.

---

CRUD Repository Overview
------------------------

[](#crud-repository-overview)

The `CrudRepository` implements a centralized pattern for managing CRUD operations, designed to work seamlessly with various models. Below is an explanation of its key methods and usage:

### **index**

[](#index)

```
$this->interface->index(Model $model, $paginated, $folder, $files, $where, $whereNot, $search, $active, $verify, $relation);
```

- Fetches records from the database.
- Supports optional filters for `where`, `whereNot`, `search`, and status (`active`, `verify`).
- Handles relationships (`$relation`) and dynamically includes image paths if `$files` and `$folder` are provided.

### **getById**

[](#getbyid)

```
$this->interface->getById(Model $model, $id, $folder, $files, $where, $whereNot, $search, $active, $verify, $relation);
```

- Fetches a single record by ID.
- Includes filters and dynamic file URLs, similar to the `index` method.

### **store**

[](#store)

```
$this->interface->store(Model $model, $data, $request, $folder, $files, $modified_values, $hashing_values, $relation);
```

- Creates a new record in the database.
- Supports:
    - Dynamic image storage.
    - Relationships: Automatically creates related records for `hasOne`, `hasMany`, and `belongsTo` relations based on the `$relation` parameter.

### **update**

[](#update)

```
$this->interface->update(Model $model, $data, $id, $request, $folder, $files, $modified_values, $hashing_values, $where, $whereNot, $search, $active, $verify, $relation);
```

- Updates an existing record by ID.
- Handles image updates, dynamic relationships, and field modifications.

### **delete**

[](#delete)

```
$this->interface->delete(Model $model, $folder, $id, $where, $whereNot, $search, $active, $verify, $relation);
```

- Deletes a record by ID, including related images stored in the specified folder.

### **verify / unverify**

[](#verify--unverify)

```
$this->interface->verify(Model $model, $id);
$this->interface->unverify(Model $model, $id);
```

- Toggles the `verified` status of a record.

### **getByDate / getBetweenDate**

[](#getbydate--getbetweendate)

- Fetch records based on specific date criteria.

### **getMoreThan / getLessThan**

[](#getmorethan--getlessthan)

- Fetch records where a field exceeds or is less than a specified value.

---

Contributing
------------

[](#contributing)

### **Bug Fixes and Updates**

[](#bug-fixes-and-updates)

- Identify and fix bugs, then push changes to the `bug` branch for review.
- Collaboration is encouraged! Your contributions are a big help in improving the project.
- For new features, create branches with descriptive names, such as `feature-event-name`.
- For fixes, use branch names like `fix-issue-description`.

We welcome collaboration and are excited to work with you to expand this project further! Please collaborate on [GitHub](https://github.com/NeeRaj556/Laravel-StarterKit-RestApi) and leave a star if you find this package useful.

### **Future Features**

[](#future-features)

- Role and permission-based access control is in progress and will be updated soon.
- Improved relational data management, including:
    - Nested CRUD operations for related models.
    - Automated handling of pivot tables for many-to-many relationships.
    - Default eager loading for optimized relational queries.

---

License
-------

[](#license)

This project is licensed under the MIT License. See the `LICENSE` file for details.

---

Author
------

[](#author)

Niraj Bajagain ()

---

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance42

Moderate activity, may be stable

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/a13485dd9f881a58ff5d8d1c0b4f15e7778e21582ff8a8d35c7b41cc336cf80c?d=identicon)[NeeRaj556](/maintainers/NeeRaj556)

---

Top Contributors

[![NeeRaj556](https://avatars.githubusercontent.com/u/109680739?v=4)](https://github.com/NeeRaj556 "NeeRaj556 (32 commits)")

### Embed Badge

![Health badge](/badges/neeraj-catalyst-starterkit-restapi/health.svg)

```
[![Health](https://phpackages.com/badges/neeraj-catalyst-starterkit-restapi/health.svg)](https://phpackages.com/packages/neeraj-catalyst-starterkit-restapi)
```

###  Alternatives

[codewithdennis/larament

Larament is a time-saving starter kit to quickly launch Laravel 13.x projects. It includes FilamentPHP 5.x pre-installed and configured, along with additional tools and features to streamline your development workflow.

3691.5k](/packages/codewithdennis-larament)[ecotone/laravel

Laravel integration for Ecotone

21307.6k3](/packages/ecotone-laravel)

PHPackages © 2026

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