1. Go to this page and download the library: Download letsgoi/nova-attach-many library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
letsgoi / nova-attach-many example snippets
use NovaAttachMany\AttachMany;
public function fields(Request $request)
{
return [
AttachMany::make('Permissions'),
];
}
public function fields(Request $request)
{
return [
AttachMany::make('Permissions'),
BelongsToMany::make('Permissions'),
];
}
->rules('min:5', 'max:10', 'size:10', new CustomRule)
public function fields(Request $request)
{
return [
AttachMany::make('Permissions'),
];
}
public function permissionsSynced(array $changes)
{
$changes['attached']; // An array of IDs of attached models
$changes['detached']; // An array of IDs of detached models
$changes['updated']; // An array of IDs of updated models
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.