PHP code example of creode / laravel-nova-account-approval
1. Go to this page and download the library: Download creode/laravel-nova-account-approval 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/ */
creode / laravel-nova-account-approval example snippets
/**
* Get the actions available for the resource.
*
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
* @return array
*/
public function actions(NovaRequest $request)
{
return [
(new \Creode\LaravelNovaAccountApproval\Actions\ApproveAccount)
->confirmText('Are you sure you want to approve this account?')
->confirmButtonText('Approve')
->cancelButtonText("Don't Approve"),
(new \Creode\LaravelNovaAccountApproval\Actions\DeactivateAccount)
->confirmText('Are you sure you want to deactivate this account?')
->confirmButtonText('Deactivate')
->cancelButtonText("Don't Deactivate"),
];
}
/**
* Get the fields displayed by the resource.
*
* @param \Laravel\Nova\Http\Requests\NovaRequest $request
* @return array
*/
public function fields(NovaRequest $request)
{
return [
// Other fields...
Boolean::make('Activated')
->sortable()
->rules('