-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
290 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ | |
/.phpunit.cache | ||
/.php-cs-fixer.cache | ||
/.phpunit.result.cache | ||
/.phpunit.cache | ||
/.phpunit.cache | ||
composer.lock |
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use Filament\Widgets\{{ chart }}Widget; | ||
|
||
class {{ class }} extends {{ chart }}Widget | ||
{ | ||
protected static ?string $heading = 'Chart'; | ||
|
||
protected function getData(): array | ||
{ | ||
return [ | ||
// | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use {{ resource }}; | ||
use {{ baseResourcePage }}; | ||
|
||
class {{ resourcePageClass }} extends {{ baseResourcePageClass }} | ||
{ | ||
protected static string $resource = {{ resourceClass }}::class; | ||
|
||
protected static string $view = '{{ view }}'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use Filament\Pages\Page; | ||
|
||
class {{ class }} extends Page | ||
{ | ||
protected static ?string $navigationIcon = 'heroicon-o-document-text'; | ||
|
||
protected static string $view = '{{ view }}'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<x-filament::page> | ||
|
||
</x-filament::page> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use Filament\Forms; | ||
use Filament\Resources\Form; | ||
use Filament\Resources\RelationManagers\RelationManager; | ||
use Filament\Resources\Table; | ||
use Filament\Tables; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use Illuminate\Database\Eloquent\SoftDeletingScope; | ||
|
||
class {{ managerClass }} extends RelationManager | ||
{ | ||
protected static string $relationship = '{{ relationship }}'; | ||
|
||
protected static ?string $recordTitleAttribute = '{{ recordTitleAttribute }}'; | ||
|
||
public static function form(Form $form): Form | ||
{ | ||
return $form | ||
->schema([ | ||
Forms\Components\TextInput::make('{{ recordTitleAttribute }}') | ||
->required() | ||
->maxLength(255), | ||
]); | ||
} | ||
|
||
public static function table(Table $table): Table | ||
{ | ||
return $table | ||
->columns([ | ||
Tables\Columns\TextColumn::make('{{ recordTitleAttribute }}'), | ||
]) | ||
->filters([ | ||
{{ tableFilters }} | ||
]) | ||
->headerActions([ | ||
{{ tableHeaderActions }} | ||
]) | ||
->actions([ | ||
{{ tableActions }} | ||
]) | ||
->bulkActions([ | ||
{{ tableBulkActions }} | ||
]); | ||
}{{ eloquentQuery }} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use {{ resource }}\Pages; | ||
use {{ resource }}\RelationManagers; | ||
use App\Models\{{ model }}; | ||
use Filament\Forms; | ||
use Filament\Resources\Form; | ||
use Filament\Resources\Resource; | ||
use Filament\Resources\Table; | ||
use Filament\Tables; | ||
use Illuminate\Database\Eloquent\Builder; | ||
use Illuminate\Database\Eloquent\SoftDeletingScope; | ||
|
||
class {{ resourceClass }} extends Resource | ||
{ | ||
protected static ?string $model = {{ modelClass }}::class; | ||
|
||
protected static ?string $navigationIcon = 'heroicon-o-collection'; | ||
|
||
public static function form(Form $form): Form | ||
{ | ||
return $form | ||
->schema([ | ||
{{ formSchema }} | ||
]); | ||
} | ||
|
||
public static function table(Table $table): Table | ||
{ | ||
return $table | ||
->columns([ | ||
{{ tableColumns }} | ||
]) | ||
->filters([ | ||
{{ tableFilters }} | ||
]) | ||
->actions([ | ||
{{ tableActions }} | ||
]) | ||
->bulkActions([ | ||
{{ tableBulkActions }} | ||
]); | ||
} | ||
{{ relations }} | ||
public static function getPages(): array | ||
{ | ||
return [ | ||
{{ pages }} | ||
]; | ||
}{{ eloquentQuery }} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use {{ resource }}; | ||
use Filament\Pages\Actions; | ||
use Filament\Resources\Pages\EditRecord; | ||
|
||
class {{ resourcePageClass }} extends EditRecord | ||
{ | ||
protected static string $resource = {{ resourceClass }}::class; | ||
|
||
protected function getActions(): array | ||
{ | ||
return [ | ||
{{ actions }} | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use {{ resource }}; | ||
use Filament\Pages\Actions; | ||
use Filament\Resources\Pages\ListRecords; | ||
|
||
class {{ resourcePageClass }} extends ListRecords | ||
{ | ||
protected static string $resource = {{ resourceClass }}::class; | ||
|
||
protected function getActions(): array | ||
{ | ||
return [ | ||
Actions\CreateAction::make(), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use {{ resource }}; | ||
use Filament\Pages\Actions; | ||
use Filament\Resources\Pages\ManageRecords; | ||
|
||
class {{ resourcePageClass }} extends ManageRecords | ||
{ | ||
protected static string $resource = {{ resourceClass }}::class; | ||
|
||
protected function getActions(): array | ||
{ | ||
return [ | ||
Actions\CreateAction::make(), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use {{ resource }}; | ||
use Filament\Pages\Actions; | ||
use {{ baseResourcePage }}; | ||
|
||
class {{ resourcePageClass }} extends {{ baseResourcePageClass }} | ||
{ | ||
protected static string $resource = {{ resourceClass }}::class; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use {{ resource }}; | ||
use Filament\Pages\Actions; | ||
use Filament\Resources\Pages\ViewRecord; | ||
|
||
class {{ resourcePageClass }} extends ViewRecord | ||
{ | ||
protected static string $resource = {{ resourceClass }}::class; | ||
|
||
protected function getActions(): array | ||
{ | ||
return [ | ||
Actions\EditAction::make(), | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use Filament\Widgets\StatsOverviewWidget as BaseWidget; | ||
use Filament\Widgets\StatsOverviewWidget\Card; | ||
|
||
class {{ class }} extends BaseWidget | ||
{ | ||
protected function getCards(): array | ||
{ | ||
return [ | ||
// | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use Closure; | ||
use Filament\Tables; | ||
use Filament\Widgets\TableWidget as BaseWidget; | ||
use Illuminate\Database\Eloquent\Builder; | ||
|
||
class {{ class }} extends BaseWidget | ||
{ | ||
protected function getTableQuery(): Builder | ||
{ | ||
// ... | ||
} | ||
|
||
protected function getTableColumns(): array | ||
{ | ||
return [ | ||
// ... | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?php | ||
|
||
namespace {{ namespace }}; | ||
|
||
use Filament\Widgets\Widget; | ||
|
||
class {{ class }} extends Widget | ||
{ | ||
protected static string $view = '{{ view }}'; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<x-filament::widget> | ||
<x-filament::card> | ||
{{-- Widget content --}} | ||
</x-filament::card> | ||
</x-filament::widget> |