Skip to content

Commit a9b85c2

Browse files
committed
wip
1 parent b7ea9cc commit a9b85c2

7 files changed

Lines changed: 49 additions & 141 deletions

File tree

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github: tempest
1+
github: tempestphp

.github/ISSUE_TEMPLATE/bug.yml

Lines changed: 0 additions & 66 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
fail-fast: true
1818
matrix:
1919
os: [ubuntu-latest, windows-latest]
20-
php: [8.4, 8.3]
20+
php: [8.4]
2121
laravel: [12.*, 11.*, 10.*]
2222
stability: [prefer-lowest, prefer-stable]
2323
include:
@@ -55,4 +55,4 @@ jobs:
5555
run: composer show -D
5656

5757
- name: Execute tests
58-
run: vendor/bin/pest --ci
58+
run: vendor/bin/phpunit

README.md

Lines changed: 42 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Laravel support for tempest/view
22

3+
<p align="center">
4+
<a href="https://tempestphp.com">
5+
<img src=".github/tempest-logo.svg" width="100" />
6+
</a>
7+
</p>
8+
9+
<h1 align="center">Tempest</h1>
10+
<div align="center">
11+
Bringing <a href="https://tempestphp.com/view">tempest/view</a> to Laravel.
12+
<br />
13+
Read the <a href="https://tempestphp.com/docs">documentation</a> to get started.
14+
</div>
15+
16+
<br />
17+
<br />
18+
319
## Installation
420

521
You can install the package via composer:
@@ -8,62 +24,35 @@ You can install the package via composer:
824
composer require tempest/view-for-laravel
925
```
1026

11-
You can publish and run the migrations with:
12-
13-
```bash
14-
php artisan vendor:publish --tag="view-for-laravel-migrations"
15-
php artisan migrate
16-
```
17-
18-
You can publish the config file with:
19-
20-
```bash
21-
php artisan vendor:publish --tag="view-for-laravel-config"
22-
```
23-
24-
This is the contents of the published config file:
25-
26-
```php
27-
return [
28-
];
29-
```
30-
31-
Optionally, you can publish the views using
32-
33-
```bash
34-
php artisan vendor:publish --tag="view-for-laravel-views"
35-
```
36-
3727
## Usage
3828

29+
From any controller, simply return an instance of `\Tempest\ViewForLaravel\TempestView`:
30+
3931
```php
40-
$viewForLaravel = new Tempest\ViewForLaravel();
41-
echo $viewForLaravel->echoPhrase('Hello, Tempest!');
32+
final readonly class HomeController
33+
{
34+
public function __invoke()
35+
{
36+
return new TempestView(__DIR__ . '/Views/home.view.php');
37+
}
38+
}
4239
```
4340

44-
## Testing
45-
46-
```bash
47-
composer test
41+
```html
42+
<!-- home.view.php -->
43+
<x-layout>
44+
<h1>Hello Laravel</h1>
45+
</x-layout>
46+
47+
<!-- x-layout.view.php -->
48+
<x-component name="x-layout">
49+
<html lang="en">
50+
<head>
51+
<title>Tempest View</title>
52+
</head>
53+
<body>
54+
<x-slot />
55+
</body>
56+
</html>
57+
</x-component>
4858
```
49-
50-
## Changelog
51-
52-
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.
53-
54-
## Contributing
55-
56-
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
57-
58-
## Security Vulnerabilities
59-
60-
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
61-
62-
## Credits
63-
64-
- [Brent Roose](https://github.com/tempest)
65-
- [All Contributors](../../contributors)
66-
67-
## License
68-
69-
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

composer.json

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -32,28 +32,24 @@
3232
},
3333
"autoload": {
3434
"psr-4": {
35-
"Tempest\\ViewForLaravel\\": "src/",
36-
"Tempest\\ViewForLaravel\\Database\\Factories\\": "database/factories/"
35+
"Tempest\\ViewForLaravel\\": "src/"
3736
}
3837
},
3938
"autoload-dev": {
4039
"psr-4": {
41-
"Tempest\\ViewForLaravel\\Tests\\": "tests/",
42-
"Workbench\\App\\": "workbench/app/"
40+
"Tempest\\ViewForLaravel\\Tests\\": "tests/"
4341
}
4442
},
4543
"scripts": {
4644
"post-autoload-dump": "@composer run prepare",
4745
"prepare": "@php vendor/bin/testbench package:discover --ansi",
4846
"analyse": "vendor/bin/phpstan analyse",
49-
"test": "vendor/bin/pest",
50-
"test-coverage": "vendor/bin/pest --coverage",
51-
"format": "vendor/bin/pint"
47+
"test": "vendor/bin/phpunit",
48+
"test-coverage": "vendor/bin/phpunit --coverage"
5249
},
5350
"config": {
5451
"sort-packages": true,
5552
"allow-plugins": {
56-
"pestphp/pest-plugin": true,
5753
"phpstan/extension-installer": true
5854
}
5955
},

0 commit comments

Comments
 (0)