Laravel Design Pattern Generator (api generator)

Overview

Laravel Design Pattern Generator (api generator)

you can create your restful api easily by using this library

and you can filter, sort and include eloquent relations based on a request

image

me

Installation:

Require this package with composer using the following command:

$ composer require g4t/laravel-design-pattern
$ php artisan vendor:publish --provider=g4t\Pattern\PatternServiceProvider 

Usage

in folder config You will find jsonapi.php
This is where you will write relations, sortable columns and filterable columns

Commands:

full command
$ php artisan make:repo User --c --r --m
or if you have model
$ php artisan make:repo User --c --r --model=User
and you can use --force command

Available command options:

Command Description
--c Create Controller and linked with repository
--m Create Model and linked with Controller Functions
--model={ModelName} Insert model in controller if you have model
--r Create apiResource Route in api.php
--force override existing Repository

Parameters to controlling data:

You can modify parameters in config/jsonapi.php

FILTER A QUERY BASED ON A REQUEST
/users?filter[name]=John

INCLUDING RELATIONS BASED ON A REQUEST

/users?include=posts
/users?include=posts,comments

SORTING A QUERY BASED ON A REQUEST

/users?sort=id
/users?sort=-id

TAKE DATA

/users?take=10

SKIP DATA

/users?skip=10

CUSTOM CONDITIONS

/users?where={"column":"parent_to","condition":"!=", "value":"0"}

License

Laravel Design Pattern Generator is free software licensed under the MIT license.

You might also like...
Create and manage A Domain Driven Design (DDD) in your Laravel app, simply and efficiently.

Create and manage A Domain Driven Design (DDD) in your Laravel app, simply and efficiently.

A lightweight domain event pattern implementation for Doctrine2.
A lightweight domain event pattern implementation for Doctrine2.

Knp Rad Domain Event A lightweight domain event pattern implementation for Doctrine2. Official maintainers: @Einenlum Installation With composer : $ c

Twig-based PatternEngine for Pattern Lab.

Twig PatternEngine for Pattern Lab The Twig PatternEngine allows you to use Twig as the template language for Pattern Lab PHP. Once the PatternEngine

States allows you to create PHP classes following the State Pattern in PHP.

States allows you to create PHP classes following the State Pattern in PHP. This can be a cleaner way for an object to change its behavior at runtime without resorting to large monolithic conditional statements and this improve maintainability and workflows writing.

Laminas\Console is a component to design and implement console applications in PHP.

laminas-console This package is abandoned and will receive no further development! We recommend using laminas/laminas-cli. Laminas\Console is a compon

Create a downloads list - quick and easy. With categories and mobile friendly design
Create a downloads list - quick and easy. With categories and mobile friendly design

Simple downloads list plugin for wordpress Create a downloads list - quick and easy. With categories and mobile friendly design What is Simple downloa

API generator for Laravel 5
API generator for Laravel 5

Apify API generator for Laravel 5 Table Of Contents Installation Configuration Usage Installation To install apify use composer Download composer requ

A Laravel Wrapper for the CoinDCX API. Now easily connect and consume the CoinDCX Public API in your Laravel apps without any hassle.
A Laravel Wrapper for the CoinDCX API. Now easily connect and consume the CoinDCX Public API in your Laravel apps without any hassle.

This package provides a Laravel Wrapper for the CoinDCX API and allows you to easily communicate with it. Important Note This package is in early deve

Html menu generator for Laravel
Html menu generator for Laravel

Html Menu Generator for Laravel This is the Laravel version of our menu package adds some extras like convenience methods for generating URLs and macr

Releases(1.4)
Owner
HusseinAlaa
Back-End Developer
HusseinAlaa
Fast and simple implementation of a REST API based on the Laravel Framework, Repository Pattern, Eloquent Resources, Translatability, and Swagger.

Laravel Headless What about? This allows a fast and simple implementation of a REST API based on the Laravel Framework, Repository Pattern, Eloquent R

Julien SCHMITT 6 Dec 30, 2022
A package to implement repository pattern for laravel models

Laravel Model UUID A simple package to use Repository Pattern approach for laravel models . Repository pattern Repositories are classes or components

null 26 Dec 21, 2022
Repository Pattern implementation for Laravel

This is a Simple Repository Pattern implementation for Laravel Projects and an easily way to build Eloquent queries from API requests.

Ephraïm SEDDOR 1 Nov 22, 2021
Auto-generated Interface and Repository file via Repository pattern in Laravel

Auto-generated Repository Pattern in Laravel A repository is a separation between a domain and a persistent layer. The repository provides a collectio

Ngo Dinh Cuong 11 Aug 15, 2022
🖖Repository Pattern in Laravel. The package allows to filter by request out-of-the-box, as well as to integrate customized criteria and any kind of filters.

Repository Repository Pattern in Laravel. The package allows to filter by request out-of-the-box, as well as to integrate customized criteria and any

Awes.io 160 Dec 26, 2022
Laravel specification pattern

Laravel specification pattern Filter an Illuminate collection with specifications. Installation You can install the package via composer: composer req

Maarten Paauw 5 Nov 30, 2022
A straightforward implementation of the Circuit Breaker pattern for Laravel 9

Laravel Circuit Breaker A straightforward implementation of the Circuit Breaker pattern for Laravel Framework 9 (using Memcached). Installation You ca

Leonardo Vieira 2 Mar 22, 2022
Rede social com laravel que possui as seguintes funcionalidades: Adicionar ao amigos, Criação de Grupo, Perfil, Criação de post, Comentários entre outros... Além de possuir um design

Social Network Sobre o Projeto Fala Devs! Estou trazendo aqui uma rede social com laravel que possui as seguintes funcionalidades: Adicionar ao amigos

Raissadev 4 Aug 1, 2022
Message box application written in Laravel - simple inbox design using auth UI.

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

null 0 Dec 25, 2021
Aplicación Laravel-Livewire-Tailwind. La aplicación se conecta a APIRest y muestra resultados, búsquedas, historial, Responsive Design

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Juan Gómez 0 Feb 10, 2022