Download the PHP package marshmallow/button-field without Composer

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

alt text

Nova Button Package

Version Issues Code Coverage Licence

Installation

You can install the package via composer:

Usage

By default this package will resolve the link from the column you provide when calling the make method. By calling the resolveUsing method you can return your own generated link to the button.

Methods

button()

When you call the button method, this will return a default Laravel Nova Button. This should have the same styling as the Update and Update & Continue Editing buttons in your Nova installation. This method is called by default so this behaviour should be available out of the box.

target()

You can call the target method to change the behaviour of your button.

download()

When you call the download method, the styling of the button will change. It will be a smaller button with a download icon next to it. We will also add the “download” tag to the button so the browser knows you want to download something. You can see an example of this in the screenshot at the top of this page.

setButtonText()

The default text of the created button is “Download”. You can change this by calling the setButtonText method.

visibleWhen()

You can use the visibleWhen method if a button should only be visible when a condition applies.

onClick()

You can use the onClick method to run any kind of action to your model. This is a very powerfull method that allows you to do anything! This currently only works on the text type button so we must set it to text(). Please check the example below how to implement this on your Nova Resource.

Now we need to create an action class that will be run when the button is clicked. You can create this anywhere you like. This could be the location app/Actions/Nova/SendInvoice.php. In this file you create a class that implements the OnClickInterface interface. You need to create 3 methods in this class. Please check the example below.

Run Nova Actions

You can now run your Nova Actions using the button field. This means its now possible to run a nova action from the form view as well. Make sure the action is registered in your resources actions method and then use the example code below.

Changelog

Please see CHANGELOG for more information what has changed recently.

Testing

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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


All versions of button-field with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3|^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 marshmallow/button-field contains the following files

Loading the files please wait ....