Download the PHP package michaeljoyner/edible without Composer

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

Edible

Maps a content structure (consisting of pages with textblocks and galleries) to Eloquent models in your Laravel application. The user, usually in some sort of admin section, can then edit the contents of the textblocks and galleries, but have no control over the creation and deletion of them.

Assumptions

This package is very opinionated, as it is structured to work with how I set up my workflow/site structure. Due to that it makes several large assumptions, which I hopefully can get rid of in the future. However, for now, this package assumes:

Installation and Setup

Install the package via composer:

composer require michaeljoyner/edible

Add the service provider:

``

Publish the migrations and views:

php artisan vendor:publish --provider="Michaeljoyner\Edible\EdibleServiceProvider"

You will have to go to your resources/views/vendor folder to adjust the views to work with your view structure.

Run the migrations: php artisan migrate

Your edible.yaml file

You need to create a file named edible.yaml in the root directory of your application. The file must adhere to the structure shown in this example:

`

The edible.yaml file describes a collection of pages. Each page has a description and a collection of textblocks and galleries. Each textblock has a description and a boolean flag to determine if the text will be edited as HTML (i.e. with a WYSIWYG editor) or as plain text. Each gallery has a description and a boolean flag to determine if it is a single image or a collection of images. If is__single is true, each image uploaded will overwrite the previous ones.

Mapping to models

Once your edible.yaml file is complete, you may run php artisan edible:map. You will be shown a summary of the changes that will be made, and asked to confirm before proceeding. If you choose to proceed, the contents of your edible file will be mapped to Eloquent models and stored in your database.

Updating the edible.yaml file

To add a new page, textblock or gallery, just add it into your edible.yaml file as normal. Next time you run php artisan edible:map, they will be added. Existing content will be untouched.

To remove a page, textblock or gallery, simply delete it from the edible.yaml file. Obviously this will also delete the associated content.

DO NOT modify the name of an existing page, textblock or gallery as YOU WILL LOSE THE EXISTING CONTENT. Rather ensure you get the names and descriptions correct before pushing your changes live. By editing the name of an existing page, textblock or gallery, when you next map, it will treat that as a new instance, and delete the "old" one along with its contents.

Editing content

The service provider registers routes to point to each page described in your edible file from where you can edit/manage each textblock or gallery. What I normally do, and hope to include automatically soon, is make a view composer for my admin section's navbar to provide a list of the pages and their urls to the navbar view so I can create the menu links. The ContentRepository->getPageListWithUrls() method exists for this reason.

Using content in the views

The Michaeljoyner\Edible\ContentRepository class is how you access the content to include in your views. Typically in your controller you would use the ContentRepository method getPageByName to retrieve the desired page. This will return an instance of Michaeljoyner\Edible\Models\Page which can be used to get contents. Below should give an example

``


All versions of edible with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5|^7.0
illuminate/support Version ^5.1
symfony/yaml Version ^2.6 || ^3.0
spatie/laravel-medialibrary Version ^3.16
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 michaeljoyner/edible contains the following files

Loading the files please wait ....