Download the PHP package maize-tech/laravel-markable without Composer

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

# Laravel Markable [![Latest Version on Packagist](https://img.shields.io/packagist/v/maize-tech/laravel-markable.svg?style=flat-square)](https://packagist.org/packages/maize-tech/laravel-markable) [![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/maize-tech/laravel-markable/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/maize-tech/laravel-markable/actions?query=workflow%3Arun-tests+branch%3Amain) [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/maize-tech/laravel-markable/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/maize-tech/laravel-markable/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/maize-tech/laravel-markable.svg?style=flat-square)](https://packagist.org/packages/maize-tech/laravel-markable) This package allows you to easily add the markable feature to your application, as for example likes, bookmarks, favorites and so on. ## Installation You can install the package via composer: You can publish and run the migrations with: You can publish the config file with: This is the content of the published config file: ## Usage ### Basic To use the package, add the `Maize\Markable\Markable` trait to the model where you want to have marks. Once done, you can define the list of possible marks for the given model implementing the `$marks` array with the list of mark classes' namespace. Here's an example model including the `Markable` trait and implementing the `Like` mark: You can now assign likes to the model: ### Custom metadata If needed, you may also add custom metadata when assigning a mark: ### Custom mark model The package allows you to define custom marks. First thing you need to do is create a migration which defines the new mark model. The package works with separate tables for each mark in order to increase the performances when executing related queries. The migration table name should contain the prefix defined in `table_prefix` attribute under `config/markable.php`. Default prefix is set to `markable_`. Here's an example migration for bookmarks: Once done, you can create a new class which extends the abstract `Mark` class and implement the `markableRelationName` method, which is used to retrieve the users who marked a given model entity with the mark entity as pivot. You can also override the `markRelationName` method, which is used to retrieve the list of marks of a given model entity. By default, the relation name is the plural name of the mark class name. Here's an example model for the bookmarks mark: That's all! You can now include the custom mark to all models you wish and use it as explained before. ### Working with mark values You might need a custom mark with a subset of allowed values. In this case, you can just define your custom mark as explained before and add the list of allowed values in `allowed_values` array under `config/markable.php`. The array key name should match the mark's class name in lower case. Here's an example when working with reactions: You can then use the custom mark with values: You can also use wildcards to allow any value for a specific mark. Here's an example when working with reactions: When set, you can use any value when giving a reaction: ### Retrieve the list of marks of an entity with eloquent ### Retrieve the list of users who marked an entity with eloquent ### Filter marked models with eloquent ## Testing ## Changelog Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. ## Contributing Please see [CONTRIBUTING](https://github.com/maize-tech/.github/blob/main/CONTRIBUTING.md) for details. ## Security Vulnerabilities Please review [our security policy](https://github.com/maize-tech/.github/security/policy) on how to report security vulnerabilities. ## Credits - [Enrico De Lazzari](https://github.com/enricodelazzari) - [Riccardo Dalla Via](https://github.com/riccardodallavia) - [All Contributors](../../contributors) ## License The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

All versions of laravel-markable with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/database Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.0
spatie/laravel-package-tools Version ^1.14.1
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 maize-tech/laravel-markable contains the following files

Loading the files please wait ....