Add contribution index page
This commit is contained in:
parent
febb90e40e
commit
3ba29b9f5e
config
modules/Contribution
|
@ -186,6 +186,7 @@ return [
|
|||
Modules\Auth\AuthServiceProvider::class,
|
||||
Modules\Form\FormServiceProvider::class,
|
||||
Modules\Fileshare\FileshareServiceProvider::class,
|
||||
Modules\Contribution\ContributionServiceProvider::class,
|
||||
],
|
||||
|
||||
/*
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
<?php
|
||||
|
||||
namespace Modules\Contribution\Components;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class FillList extends Component
|
||||
{
|
||||
public function render()
|
||||
{
|
||||
return <<<'HTML'
|
||||
<x-page::layout title="Zuschüsse" menu="contribution">
|
||||
</x-page::layout>
|
||||
HTML;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace Modules\Contribution\Components;
|
||||
|
||||
use Tests\TestCase;
|
||||
use Illuminate\Foundation\Testing\DatabaseTransactions;
|
||||
use Livewire\Livewire;
|
||||
|
||||
uses(TestCase::class);
|
||||
uses(DatabaseTransactions::class);
|
||||
|
||||
beforeEach(function () {
|
||||
test()->login()->loginNami();
|
||||
});
|
||||
|
||||
it('displays page', function () {
|
||||
test()->get(route('contribution.index'))
|
||||
->assertSeeLivewire(FillList::class);
|
||||
});
|
||||
|
||||
it('loads component', function () {
|
||||
Livewire::test(FillList::class)
|
||||
->assertSee('Zuschüsse');
|
||||
});
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace Modules\Contribution;
|
||||
|
||||
use Illuminate\Routing\Router;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Modules\Contribution\Components\FillList;
|
||||
|
||||
class ContributionServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function boot()
|
||||
{
|
||||
app(Router::class)->middleware(['web', 'auth:web'])->group(function ($router) {
|
||||
$router->get('/contribution', FillList::class)->name('contribution.index');
|
||||
});
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue