Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion resources/js/components/NotesWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

<div class="m-8">
<textarea
placeholder="Type a note, and press enter."
placeholder="{{ __('Type a note, and press enter') }}."
class="w-full form-control form-input form-input-bordered bg-40 border-40 py-3 h-auto"
v-model="note"
@keydown.enter="addNote"
Expand Down
21 changes: 16 additions & 5 deletions src/NovaResourceNotes.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,18 @@

namespace DigitalCloud\NovaResourceNotes;

use DigitalCloud\NovaResourceNotes\Resources\Note;
use Laravel\Nova\Nova;
use Laravel\Nova\Tool;

class NovaResourceNotes extends Tool
{

/**
* @var mixed
*/
public $noteResource = Note::class;

/**
* Perform any tasks that need to happen when the tool is booted.
*
Expand All @@ -16,15 +23,19 @@ public function boot()
{
Nova::script('nova-eloquent-notes', __DIR__.'/../dist/js/tool.js');
Nova::style('nova-eloquent-notes', __DIR__.'/../dist/css/tool.css');
Nova::resources([
$this->noteResource
]);
}

/**
* Build the view that renders the navigation links for the tool.
*
* @return \Illuminate\View\View
* @param string $noteResource
* @return mixed
*/
public function renderNavigation()
public function noteResource(string $noteResource)
{
return view('nova-eloquent-notes::navigation');
$this->noteResource = $noteResource;

return $this;
}
}
4 changes: 0 additions & 4 deletions src/ToolServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ public function boot()

$this->app->booted(function () {
$this->routes();

Nova::resources([
Note::class
]);
});

Nova::serving(function (ServingNova $event) {
Expand Down