Download the PHP package cuytamvan/base-pattern-laravel without Composer

On this page you can find all versions of the php package cuytamvan/base-pattern-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package base-pattern-laravel

Base Repo Laravel

Total Downloads Lisence

Instalation 💻

you can install the package via composer

composer require cuytamvan/base-pattern-laravel

Setup package in Lumen

you should copy config

cp ./vendor/cuytamvan/base-pattern-laravel/config/cuypattern.php ./config/cuypattern.php

change your bootstrap/app.php

Setup package in laravel

add your config/app.php

publish your fucking provider with command : php artisan vendor:publish

and choose Provider: Cuytamvan\BasePattern\BasePatternServiceProvider

run the migration to create table for this package:

php artisan migrate

Basic Usage

create repository file

php artisan make:repository ModuleName

it will generate file: ModuleNameRepository

and controller:

Searchable

On controller setup your index

using where

using with

using withCount

using whereHas

Config

app/config/cuypattern.php

if not using _limit on get query default limit will take limit from default limit

change payload

Min

filter data with min value of field, available for field date and numeric

example url:

{{base_url}}/module-name?_min=created_at:2022-02-02

{{base_url}}/module-name?_min=price:20000

if want to filter more than 1 field:

example url:

{{base_url}}/module-name?_min=created_at:2022-02-02|updated_at:2022-02-02

{{base_url}}/module-name?_min=price:20000|qty:20000

Max

filter data with max value of field, available for field date and numeric

example url:

{{base_url}}/module-name?_max=created_at:2022-02-02

{{base_url}}/module-name?_max=price:20000

if want to filter more than 1 field:

example url:

{{base_url}}/module-name?_max=created_at:2022-02-02|updated_at:2022-02-02

{{base_url}}/module-name?_max=price:20000|qty:20000

Search like

filter data with search like

example url:

{{base_url}}/module-name?_like=name:loremipsumdolor

{{base_url}}/module-name?_like=name,username,email:loremipsumdolor

Search perfield

filter data with search spesific columns, but you must define function on your model

example url for search like:

{{base_url}}/module-name?_search=name:lorem ipsum dolor sit amet|email:test

example url for search exact:

{{base_url}}/module-name?_search=name!:lorem ipsum dolor sit amet|email!:test

Search by relation

filter data with search spesific columns on relation, but you must define function on your model

example url for search like:

{{base_url}}/module-name?_search_relation=user.name:cuytamvan

example url for search exact:

{{base_url}}/module-name?_search_relation=user.name!:cuytamvan

Order

order by field

example url:

{{base_url}}/module-name?_order=name:asc

if want to order more than 1 field:

{{base_url}}/module-name?_order=name:asc|email:desc

Combine all searchable

{{base_url}}/module-name?_order=name:asc|email:desc&_search=name:lorem&_min=created_at:2022-02-02


All versions of base-pattern-laravel with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cuytamvan/base-pattern-laravel contains the following files

Loading the files please wait ....