Download the PHP package bryceandy/press without Composer

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

Press

Actions Status Total Downloads Latest Stable Version License

This Laravel package can be used to publish and update your blogs using markdown files.

✅ Locate where your markdown files are (i.e local file directory, cloud)
✅ Create or update these files
✅ Select custom fields for your posts
✅ Customize how any extra field can be parsed
✅ Choose when to publish or update the posts by scheduling a command

Requirements

Your project needs to meet the following requirements:

Installation

Run the following command on your terminal to install the package

Usage

Publish configurations and run migrations

Run the following artisan command, and the config file press.php will be published in the config directory.

You may require to store your markdown files in a specific driver. But currently this package supports the local file driver.

Update the configuration option file.path in the published file with the directory where you will store your markdown files.

If you do not update this path make sure you create a blogs directory in the root of the project and store your files.

You should also run the artisan migrate command to add the posts table.

Markdown files syntax

The posts of your blog will have one required field title, and your own custom fields. The following is a sample syntax for your markdown files:

Customize parsing of additional fields

If you wish to customize how an additional field is parsed (saved in the database), or you may wish to override how the title field is parsed:

Suppose we want to create a birthday field that should be parsed as a Carbon instance

  1. Add the birthday field in the mardown file of your post

  2. Create a custom class for the field and extend the FieldContract class

  3. Inherit the static process method and return the value of $field in an array

  4. Publish the Press service provider,

Do not forget to register the published service provider and the Press facade in the config/app.php file

  1. Register the field class

In the service provider you will find the registerFields method, and thats where you are required to register custom field classes,

Publishing posts

When you are ready to publish your posts, or update existing an one, you may run the following command or schedule it to run in the background whenever you want

Fetching your posts

If you could successfully run the previous command that means your posts are saved in your posts table.

You may use the Bryceandy\Press\Post model to fetch posts.

The custom fields

When retrieving all custom fields you may use the extra field in the following way:

Upcoming features

🔘 Support for cloud drivers, specifically Amazon S3.

License

MIT license.

Feel free to submit pull requests to contribute to the package.


All versions of press with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
erusev/parsedown Version ^1.7
ext-json 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 bryceandy/press contains the following files

Loading the files please wait ....