Download the PHP package creode/laravel-nova-assets without Composer

On this page you can find all versions of the php package creode/laravel-nova-assets. 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-nova-assets

Takes the existing Laravel Assets module and adds functionality to make it work in Nova.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Takes the existing Laravel Assets module and adds hookable functionality to make it work in Nova.

Installation

You can install the package via composer:

You can publish the config file with:

This is the contents of the published config file:

Usage

The purpose of this module is to use the existing assets model class and wrap it into a Nova resource. This allows us to use the existing functionality of the assets module in Nova. We use some hookable functionality which is documented below that gives any child modules the ability to add custom fields and actions to the resource.

Registering Custom Resource Fields

You can register custom resource fields to appear in both the standard Nova pages (detail, edit, create) and the Bulk Asset Upload action. To do this you need to listen for the DefineAssetFieldsEvent event and add your fields to the $fields array. For a full list of Nova fields please look at the Nova documentation.

Registering Custom Resource Actions

You can register custom resource actions to appear on the Asset resource. To do this you need to listen for the DefineAssetActionsEvent event and add your actions to the $actions array. These just use Nova's standard Actions functionality. For details about defining actions please look at the Nova documentation.

Registering Custom Bulk Asset Fields

You can register custom bulk asset fields to appear on the Bulk Asset Upload action. To do this you need to listen for the DefineBulkAssetFieldsEvent event and add your fields to the $fields array. For a full list of Nova fields please look at the Nova documentation.

Insert a field after another one

As of version 1.4.0 of this module, you can now run a helper function to add an attribute in after another one. This can be done by running the following:

This will then inject the field directly after the other. This is useful if you want to add a field after a specific field but don't want to have to worry about the order of the fields in the array. The only caveat here is that if the field with the provided first attribute doesn't exist, it will not add the field.

Permissions

This module exposes a new permission seeder class which will need to be published to your application in order to grant permissions to the new resource. To do this you need to run the following command:

This will create a new AssetRoleAndPermissionSeeder.php file within your database/seeders directory. This will need to be run in order to grant permissions to the new resource. You can run this by running the following command:

You should now see in your database a collection of permissions and a new role called asset-manager. This role will have all the permissions required to manage assets. Before running this, it requires the setup of any tables for the spatie/laravel-permissions package. Please see the documentation for more information.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of laravel-nova-assets with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
creode/laravel-assets Version ^1.4
creode/nova-mime-asset-icon-field Version ^1.0
creode/permissions-seeder Version ^1.0
digital-creative/nova-filepond Version ^1.0.3
illuminate/contracts Version ^10.0 | ^11.0
intervention/image Version ^3.0
laravel/nova Version ^4.27
spatie/laravel-package-tools Version ^1.14.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 creode/laravel-nova-assets contains the following files

Loading the files please wait ....