Download the PHP package mhamzeh/presenter-filter without Composer

On this page you can find all versions of the php package mhamzeh/presenter-filter. 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 presenter-filter

Presenter-Filter Laravel

Introduction

The package allows you to create two types of classes: filter class and presenter class

Filter

This package allows you to easily handle database filtering through query strings.

example: /users?status=1&name='kami'

Presenter

Sometimes our models get too fat, and that can make our development a lot harder. In this case, we use a second class that has the same function as the model and is used as a second model, and the Harrow method can be included in this class.

Installation

you can install the package via composer:

You Must by publishing configuration by issuing following artisan command .

Usage

You have access to two commands and you can use them to create your own filter and presenter classes

make:filter command

You can use the following command to create a new filter.

This will create a new filter in the app/Filters directory.

options:

1-You can add the model to the command

‍‍‍‍‍‍

Used by default Models folder If you have saved models elsewhere, change the config Modules of this folder

make:presenter Command

You can use the following command to create a new Presenter

options:

1- You can add the model to command

Example With Filter

Let's say you want to use filterable on User model. You will have to create the filter class App/Filters/PostFilter.php ()

If you use the --model option, filterable will be added directly to the model

Now you need to add local scope to your model if you have not used the --model option:

Finaly, call the scope in controller like so:

Example With Presenter

Let's say you want to use Presentable And introduce the presenter class on User model. You will have to create the filter class App/Presenter/UserPresenter.php ()

If you use the --model option, Presentable and presenter class will be added directly to the model

Now you need to add local scope to your model if you have not used the --model option:

Finally you can use this method in your Blade or Api Resources or Controller for example Blade:

in Api Resources:


All versions of presenter-filter with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
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 mhamzeh/presenter-filter contains the following files

Loading the files please wait ....