Skip to content

Commit

Permalink
Merge pull request #363 from HendrikPrinsZA/feature/tinker-welled
Browse files Browse the repository at this point in the history
Added support for Tinkerwell
  • Loading branch information
HendrikPrinsZA committed Feb 27, 2024
2 parents ec0c724 + 1b36408 commit b306eb1
Show file tree
Hide file tree
Showing 7 changed files with 605 additions and 484 deletions.
22 changes: 22 additions & 0 deletions .tinkerwell/panels/SalesPanel.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

use Tinkerwell\Panels\Panel;
use Tinkerwell\Panels\Table\Section;
use Tinkerwell\Panels\Table\Table;

class SalesPanel extends Panel
{
public function __construct()
{
$this->setTitle("Sales");

$sales = Table::make()->addSection(
Section::make()
->setTitle("Section 1")
->addRow("Row 1", 0)
->addRow("Row 2", 1000)
);

$this->setContent($sales);
}
}
13 changes: 13 additions & 0 deletions .tinkerwell/snippets/SampleSnippet.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?php

/**
* @label Sample Snippet
* @description Gets the count of users and the current environment
*/

use App\Models\User;

dump([
"users" => User::count(),
"env" => app()->environment()
]);
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
"php-coveralls/php-coveralls": "^2.5",
"phpunit/phpcov": "^9.0",
"phpunit/phpunit": "^10.0",
"spatie/laravel-ignition": "^2.0"
"spatie/laravel-ignition": "^2.0",
"beyondcode/tinkerwell": "*"
},
"autoload": {
"files": [
Expand Down Expand Up @@ -86,5 +87,6 @@
"pestphp/pest-plugin": true
}
},
"prefer-stable": true
"prefer-stable": true,
"minimum-stability": "dev"
}
Loading

0 comments on commit b306eb1

Please sign in to comment.