mirror of
https://github.com/pnx/dotfiles
synced 2026-06-16 03:14:55 +02:00
phpactor: add templates for laravel
This commit is contained in:
parent
aecab153cd
commit
8b10581ca9
3 changed files with 32 additions and 0 deletions
|
|
@ -3,3 +3,7 @@ language_server_phpstan.enabled: true
|
|||
# language_server_phpstan.mem_limit: 100000
|
||||
language_server_psalm.enabled: false
|
||||
# phpunit.enabled: true
|
||||
|
||||
code_transform.class_new.variants:
|
||||
laravel-test: laravel-feature-test
|
||||
livewire: livewire
|
||||
|
|
|
|||
13
phpactor/templates/laravel-feature-test/SourceCode.php.twig
Normal file
13
phpactor/templates/laravel-feature-test/SourceCode.php.twig
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
<?php
|
||||
|
||||
namespace {{ prototype.namespace }};
|
||||
|
||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
||||
use Tests\TestCase;
|
||||
|
||||
{% for class in prototype.classes %}
|
||||
class {{ class.name }} extends TestCase
|
||||
{
|
||||
use RefreshDatabase;
|
||||
}
|
||||
{% endfor %}
|
||||
15
phpactor/templates/livewire/SourceCode.php.twig
Normal file
15
phpactor/templates/livewire/SourceCode.php.twig
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
|
||||
namespace {{ prototype.namespace }};
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
{% for class in prototype.classes %}
|
||||
class {{ class.name }} extends Component
|
||||
{
|
||||
public function mount() : void
|
||||
{
|
||||
}
|
||||
}
|
||||
{% endfor %}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue