Download the PHP package caneara/elevate without Composer

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

Elevate

This package provides a library of macro functions for various Laravel components. Use them to augment the existing functionality offered by the likes of Blade, Collections, Stringable, and so on.

Initially, only a handful of macros are available. That said, the library has been designed so that it can handle dozens or even hundreds of macros being added over time. Each individual macro may also be disabled, thus ensuring that Laravel isn't spending precious time registering macros you are not using.

Installation

Pull in the package using composer

Configuration

If you wish to make all of the macros available to your application, then you can skip this section. Otherwise, you should publish the configuration file using Artisan:

You may wish to disable a particular macro for one of the following reasons:

  1. Performance - if you aren't using the macro, or even the class itself, then disabling it will net a tiny performance boost.
  2. Conflicts - if you already have a macro for a class, or wish to create one with the same name, you should disable the Elevate macro to prevent conflicts.

To prevent a macro being registered, simply set its value to false:

Available macros

The following macros are currently available:

Macro Class Description
filled Blade Enables the use of @filled() and @endfilled. Uses the filled() global helper under the hood. You may also use @else e.g. @filled() @else @endfilled
blank Blade Enables the use of @blank() and @endblank. Uses the blank() global helper under the hood. You may also use @else e.g. @blank() @else @endblank
appendIf Stringable Appends the given string to the string if it doesn't already finish with it
collapse Stringable Trims the string and replaces multiple whitespace characters with a single space
count Stringable Determine the total number of times the given string appears within the string
get Stringable Adds a more friendly helper to access a fluent string's content e.g. Str::of('test')->get()
insert Stringable Injects the given string at the given index
padLeft Stringable Pad the string to the given length from the left side
padRight Stringable Pad the string to the given length from the right side
possessive Stringable Converts the string to a possessive version e.g. Bob -> Bob's
prependIf Stringable Prepends the given string to the string if it doesn't already start with it
segment Stringable Splits the string using the given delimiter, then retrieves the item at the given array index
toArray Stringable Converts the string into an array of characters
toggle Stringable Toggles the string between two states. Contains a $loose flag to allow the switching of a string that matches neither states
after Collection Get the next item from the collection
at Collection Retrieve an item at an index
second Collection Retrieve item at the second index
third Collection Retrieve item at the third index
fourth Collection Retrieve item at the fourth index
fifth Collection Retrieve item at the fifth index
sixth Collection Retrieve item at the sixth index
seventh Collection Retrieve item at the seventh index
eighth Collection Retrieve item at the eighth index
ninth Collection Retrieve item at the ninth index
tenth Collection Retrieve item at the tenth index
before Collection Get the previous item from the collection
carbonize Collection Convert all collection items into instances of CarbonImmutable
chunkBy Collection Chunks the values from a collection into groups as long the given callback is true
collectBy Collection Get an item at a given key, and collect it
eachCons Collection Get the following consecutive neighbours in a collection from a given chunk size
extract Collection Extract keys from a collection
filterMap Collection Map a collection and remove falsy values in one go
firstOrFail Collection Get the first item or throw an exception
fromPairs Collection Transform a collection into an associative array form collection item
glob Collection Returns a collection of a glob() result
groupByModel Collection Similar to groupBy, but groups the collection by an Eloquent model
head Collection Retrieves first item from the collection
ifAny Collection Executes the passed callable if the collection isn't empty
ifEmpty Collection Executes the passed callable if the collection is empty
none Collection Checks whether a collection doesn't contain any occurrences of a given item, key-value pair, or passing truth test
paginate Collection Create a LengthAwarePaginator instance for the items in the collection
parallelMap Collection Identical to map but each item in the collection will be processed in parallel
pluckToArray Collection Returns array of values of a given key
prioritize Collection Move elements to the start of the collection
rotate Collection Rotate the items in the collection with given offset
sectionBy Collection Splits a collection into sections grouped by a given key
simplePaginate Collection Create a Paginator instance for the items in the collection
sliceBefore Collection Slice the values out from a collection before the given callback is true
tail Collection Extract the tail from a collection (everything except the first element)
toPairs Collection Transform a collection into an array with pairs
transformKeys Collection Performs a transform operation, but on the collection's keys instead of its values
transpose Collection Rotate a multidimensional array, turning the rows into columns and the columns into rows
trim Collection Maps over each item in the collection and calls PHP's trim() method on it
validate Collection Returns true if the given callback returns true for every item
withSize Collection Create a new collection with the specified amount of items

Contributing

Thank you for considering a contribution to Elevate. You are welcome to submit a PR containing a new macro or improvements to existing ones, however please also be sure to include a test or tests where appropriate.

Credits

The library includes macros and / or code obtained from the following open-source packages:

License

The MIT License (MIT). Please see License File for more information.


All versions of elevate with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
amphp/parallel Version ^1.4
amphp/parallel-functions Version ^0.1.3
symfony/stopwatch Version ^5.0
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 caneara/elevate contains the following files

Loading the files please wait ....