Download the PHP package antonioprimera/laravel-web-page without Composer

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

Your new package name

Installation

Usage

Architecture

The web page uses Components and Bits to be able to store any configurable data. Components are used to group other components and bits. Bits are used to store texts, image urls or any other data which will be displayed.

Components

Components are Eloquent Models,

Bits

Creating a recipe (via Artisan)

To create a new recipe file, you can use the following artisan command:

php artisan web-page:make:recipe RecipeName

This will generate a simple recipe file, something like a database migration, where you can define the list of components and bits to be created at root level and their component and bit structures.

If you want to create a complex recipe, defining the components, aliases and bit aliases, you can add the flag --complex to the above artisan command.

Creating / deleting components using a recipe file

Once you have created a recipe file, with the necessary components and bits for your web page, you can use another artisan command to actually create the Web Components defined in the file as Eloquent Models in the database:

php artisan web-page:recipe RecipeName

This will use the recipe file RecipeName and run its up() method to create the structure you returned from the recipe() method.

If you want to undo the creation of components from a recipe file, you can use the --down flag on the above command, which will look for all created Web Components and Bits and remove them (something like the 'migrate:rollback' command). This basically just runs the down() method of the recipe, which, if not overridden, will blindly try to remove all Eloquent Models created by the up() method recursively.

ComponentManager

Creating a component

Method signature:

createComponent(string $description, array $definition = []): ?Component

The description format is as follows: "type:name:uid". The type is mandatory, but the name and the uid are optional. If not provided, the uid will be the component name in kebab case. If not provided, the name will be the component type.

Examples:

The types must be described in the config: webComponents.components. Each component type must have the type as the key and an array with the component definition as the value. If a component must contain other components the list of components will be provided as an indexed array. If a component must contain a set of bits, the list of bits will be provided as an indexed array.

Config sample (webComponents.php):

Creating a bit

Method signature:

createBit(string $description): ?Bit

The description format is as follows: "type:name:uid". The type is mandatory, but the name and the uid are optional. If not provided, the uid will be the bit name in kebab case. If not provided, the name will be the bit type.

Examples:

Helper

webPage()->getLanguage()

Facade

WebPage::getLanguage()


All versions of laravel-web-page with dependencies

PHP Build Version
Package Version
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 antonioprimera/laravel-web-page contains the following files

Loading the files please wait ....