achalj09/editresource

Edit Resource Button

Installs: 12 444

Dependents: 0

Suggesters: 0

Security: 0

Stars: 4

Watchers: 3

Forks: 0

Open Issues: 0

Language:Vue

0.0.1 2019-01-22 07:15 UTC

This package is not auto-updated.

Last update: 2024-05-09 07:56:46 UTC


README

In Laravel Nova, when you use Custom Tool for creating/editing/updating Custom Page,

you might need "Edit Resource Button" with edit SVG icon as custom link field.

Install using

composer require achalj09/editresource

Use in resources

use Achalj09\Editresource\Editresource;


Editresource::make('Edit','edit')
  ->details([
      'href' => function () {
          return "../../createjobs/{$this->id}/edit";
      },
      'text' => function () {
          return 'edit';
      },
  ])->onlyOnIndex()
  ->canSee(function ($request) {
      return $request->user()->can('Update Jobs', $this);
}),

Output

alt Sample Image