Download the PHP package mookofe/laravel-support without Composer

On this page you can find all versions of the php package mookofe/laravel-support. 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 laravel-support

mookofe/laravel-support

Awesome enhancements for your current Laravel Models, Collections.

Build Status Latest Stable Version License

Features

Requirements

Version

1.0.1

Installation

Preparation

Open your composer.json file and add the following to the require array:

Install dependencies

Or

Integration

Change inheritance on your models, instead of using the default Eloquent Model change as follow:

Using Model features:

Getting human dates from model fields

This method works both for string and carbon dates fields.

Check if an attribute exists in the model

This function verify if an attribute already exists in the current model.

Get changes in a model

Return an array with the affected properties.

Create new model from existing using only specific fields

Create a new instance only with the fields specified

Remove model fields

Allows you to remove fields in model

Using Collection features:

Our model is configured to use our collection which extends from Eloquent Collection, so all methods from the Eloquent Collection can be used.

Rebuild collection

Allows you to rebuild a collection using the fields you want. Imagine you have a user table with the following fields: (id, name, lastname, sex)

Compare collections

Allows you to compare if all values of a field is present in another collection.

Create new instance

Allows you to create a new empty instance of the same type of the current collection

Get latests rows grouped by fields

Return a new collection with the latest rows grouped by the fields specified, in the order of the collection items. Imagine you have a post table with the following fields (id, user_id, post_category_id).

This example allows you to get the latest posts categories for the user.

Get first rows grouped by fields

Return a new collection with the first rows grouped by the fields specified, in the order of the collection items. Using the previous table structure, in this example you get the first posts categories for the user.

Sum values by field in collection

Sum all values matching the search criteria. In this example the function will sum all products prices from category 10.

Find items on collection

Allows you to find items on the collection filter by data in the array. In this example we will filter all products with product category 10 and price 100.

Merge collections

Merge fields from the new collection if values matches. In this example we will merge the avatar file path to the user model.

Custom value for found item

Allows you to return a custom value if the item you are looking for it's been found. If no option is specified the model is returned.

Delete all models from collection

Allows you to delete all models from the database in the current collection.

Collection average by field

Allows you to get the average by a field

Find items not matching the filter

Allows you to find items on the collection not matching the filter criteria. In this example we will filter all products where product category is different to 10.

Get maximum item by field name

Get the max value of the given key and return the item. In this example the function will return the max user from the collection.

Convert collection to flat array

Convert the entire collection to a single array using the value of the property specified in the parameter.

License

This package is open-sourced software licensed under the MIT license


All versions of laravel-support with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.7
illuminate/support Version 5.*
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 mookofe/laravel-support contains the following files

Loading the files please wait ....