Skip to content

Commit

Permalink
Add field basics
Browse files Browse the repository at this point in the history
  • Loading branch information
sietse85 committed May 19, 2022
1 parent aca0e3b commit bef651e
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 32 deletions.
63 changes: 36 additions & 27 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,29 +1,38 @@
{
"name": "sietse85/nova-button",
"description": "A Laravel Nova field.",
"keywords": [
"laravel",
"nova"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0"
},
"autoload": {
"psr-4": {
"Sietse85\\NovaButton\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Sietse85\\NovaButton\\FieldServiceProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
"name": "sietse85/nova-button",
"description": "Clickable Button Field for Nova 4",
"authors": [
{
"name": "Sietse Sietsma",
"email": "sietse85@gmail.com"
}
],
"keywords": [
"laravel",
"nova",
"button",
"nova4",
"field"
],
"license": "MIT",
"require": {
"php": "^7.3|^8.0"
},
"autoload": {
"psr-4": {
"Sietse85\\NovaButton\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Sietse85\\NovaButton\\FieldServiceProvider"
]
}
},
"config": {
"sort-packages": true
},
"minimum-stability": "dev",
"prefer-stable": true
}
5 changes: 5 additions & 0 deletions routes/api.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php
Route::post(
'/{resource}/{resourceId}/{buttonKey}',
'NovaButton\Http\Controllers\ButtonController@handle'
);
10 changes: 5 additions & 5 deletions src/NovaButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

class NovaButton extends Field
{
/**
* The field's component.
*
* @var string
*/
public $component = 'nova-button';

public string $classes = '';

public string $event = '';

}

0 comments on commit bef651e

Please sign in to comment.