Skip to content

Commit 626b87c

Browse files
committed
wip
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
1 parent 532ca73 commit 626b87c

File tree

5 files changed

+28
-2
lines changed

5 files changed

+28
-2
lines changed

bin/sync

+8
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ Illuminate\Support\Collection::make([
2222

2323
$files->copy("{$workingPath}/core/testbench.yaml", "{$workingPath}/testbench.yaml");
2424

25+
Illuminate\Support\Collection::make([
26+
...$files->glob("{$workingPath}/core/workbench/app/View/Components/*"),
27+
])->flatten()
28+
->filter(fn ($file) => is_file($file))
29+
->each(function ($file) use ($files, $workingPath) {
30+
$files->copy($file, "{$workingPath}/workbench".Illuminate\Support\Str::after($file, "{$workingPath}/core/workbench"));
31+
});
32+
2533
Illuminate\Support\Collection::make([
2634
...$files->glob("{$workingPath}/core/workbench/config/*"),
2735
...$files->glob("{$workingPath}/core/workbench/routes/*"),

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"php": "^7.3 || ^8.0",
2424
"laravel/framework": "^8.83.27",
2525
"mockery/mockery": "^1.4.4",
26-
"orchestra/testbench-core": "^6.43",
26+
"orchestra/testbench-core": "^6.44",
2727
"phpunit/phpunit": "^8.5.21 || ^9.5.10",
2828
"spatie/laravel-ray": "^1.29.7"
2929
},

testbench.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@ workbench:
1313
web: true
1414
api: true
1515
commands: true
16+
views: true
1617

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace Workbench\App\View\Components;
4+
5+
use Illuminate\View\Component;
6+
use Illuminate\View\View;
7+
8+
class Alert extends Component
9+
{
10+
/**
11+
* Get the view / contents that represent the component.
12+
*/
13+
public function render()
14+
{
15+
return '<div>Alert Component</div>';
16+
}
17+
}

0 commit comments

Comments
 (0)