Download the PHP package detosphere-ltd/laravel-faqs without Composer

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

Laravel FAQs

This is a simple package to help manage frequently asked questions in a project.

Installation

You can install the package via composer by running:

After the installation has completed, the package will automatically register itself. Run the following to publish the migration file

After publishing the migration you can create the faqs table by running the migrations:

Models and Migrations

This package has only one model (Faq) and its corresponding migration file. You are allowed to extend it and use it any how you want. The model only guarded properties on the model are the id and uuid.

Scopes

The Faq model has scopeType to query faqs by type. It is as easy as shown below.

Action classes

This package exposes four action classes. Find details about them below.

CreateFAQAction

This is used to create a new faq. The execute method accepts an array. It returns the created faq.

UpdateFAQAction

This is used to update an already existing faq. The execute method accepts the faq to update and an array. It returns the updated faq.

DeleteFAQAction

This is used to delete an existing faq from the database. The execute method accepts the faq to delete. Faqs are soft deleted. It returns void.

IncrementFAQHelpfulnessAction

This is used to increment the helpful_yes and helpful_no of an existing faq in the database. The execute method accepts the faq to increment and the helpfulness to increment. Helpful must be yes or no. It returns the incremented faq. Throws an query exception if invalid helpful paramater is passed.

Usage

You can instantiate the class like you would any normal PHP class

Also, you can also resolve the class from laravel's container

Lastly, you can also inject the action class into your controller method like below.

Testing

Contributing

Please see CONTRIBUTING for details.

License

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


All versions of laravel-faqs with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^8.0
alhaji-aki/laravel-uuid Version ^1.0
illuminate/database Version ^7.30|^8.0
illuminate/support Version ^7.30|^8.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 detosphere-ltd/laravel-faqs contains the following files

Loading the files please wait ....