Download the PHP package coyote6/laravel-base without Composer

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

Laravel Base

This is just a collection of commonly used traits that are used throughout my sites and packages, such as UUIDs and autofilling author_id fields on models.

To use

  1. Select which traits you would like to implement.
  2. Add that trait(s) to the model.

Available Traits

Boot Method

BootTraits - Used to call the boot methods on creating, created, updating, updated, deleting, and deleted methods. Calls the parent method prior to implementing the other methods. Also adds static::getUser(), static::getUserId() methods to the find the current user in other traits.

Creation Helpers That Require The Boot Method

HasAuthor - Autofills a author_id property on the model using the current user's id. HasClient - Autofills a client_id property on the model using the current user's client_id if the user has one. HasMachineName - Autofills a machine_name property on the model using the name property, removing spaces and all punctuations. HasUuid - Autofills the id property on the model with a uuid.

Select Dropdown/Radio Button Helpers

GetAsOptions - Uses the id and name model properties to create an array of options for select dropdowns and radio buttons. GetAsOptionsAbbr - Uses the abbr and name model properties to create an array of options for select dropdowns and radio buttons. (Same as GetAsOptions, but uses an abbreviation field instead of the name. Mainly used for states and countries.)

Query Helpers

GetBySlug - Selects a model by a unique slug property.

Examples

Uuid Example

App\Models\Example.php

This example just auto adds a uuid as the id if not filled in on creation.

All Boot Traits Example

App\Models\Example.php

This example auto adds a uuid as the id, the user\'s id and client id as author_id and client_id respectfully, and a machine name_based on the name if not filled in on creation.

Get As Options Example

App\Models\Example.php

App\Http\Controllers\ExampleController.php

Get As Options Abbreviation Example

App\Models\Example.php

App\Http\Controllers\ExampleController.php

Get By Slug Example

App\Models\Example.php

App\Http\Controllers\ExampleController.php


All versions of laravel-base with dependencies

PHP Build Version
Package Version
Requires webpatser/laravel-uuid Version ^4.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 coyote6/laravel-base contains the following files

Loading the files please wait ....