Skip to content

Commit d6581f3

Browse files
committed
wip
1 parent 0eb7758 commit d6581f3

File tree

85 files changed

+2319
-2417
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+2319
-2417
lines changed

app/Console/Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Kernel extends ConsoleKernel
1010
/**
1111
* Define the application's command schedule.
1212
*
13-
* @param \Illuminate\Console\Scheduling\Schedule $schedule
13+
* @param Schedule $schedule
1414
* @return void
1515
*/
1616
protected function schedule(Schedule $schedule)

app/Events/DealQualified.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public function __construct(Deal $deal)
3030
/**
3131
* Get the channels the event should broadcast on.
3232
*
33-
* @return \Illuminate\Broadcasting\Channel|array
33+
* @return Channel|array
3434
*/
3535
public function broadcastOn()
3636
{

app/Exceptions/Handler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class Handler extends ExceptionHandler
1010
/**
1111
* A list of exception types with their corresponding custom log levels.
1212
*
13-
* @var array<class-string<\Throwable>, \Psr\Log\LogLevel::*>
13+
* @var array<class-string<Throwable>, \Psr\Log\LogLevel::*>
1414
*/
1515
protected $levels = [
1616
//
@@ -19,7 +19,7 @@ class Handler extends ExceptionHandler
1919
/**
2020
* A list of the exception types that are not reported.
2121
*
22-
* @var array<int, class-string<\Throwable>>
22+
* @var array<int, class-string<Throwable>>
2323
*/
2424
protected $dontReport = [
2525
//

app/Filament/Pages/Auth/Login.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
namespace App\Filament\Pages\Auth;
44

5-
use Filament\Http\Livewire\Auth\Login as BasePage;
6-
7-
class Login extends BasePage
5+
class Login extends \Filament\Auth\Pages\Login
86
{
97
public function mount(): void
108
{

app/Filament/Pages/Dashboard.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
class Dashboard extends BasePage
1212
{
13-
protected static ?string $navigationIcon = 'heroicon-o-chart-bar';
13+
protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-chart-bar';
1414

1515
public function getWidgets(): array
1616
{

app/Filament/Resources/AccountResource.php

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,21 @@
22

33
namespace App\Filament\Resources;
44

5+
use Filament\Schemas\Schema;
6+
use Filament\Schemas\Components\Group;
7+
use Filament\Schemas\Components\Section;
8+
use Filament\Actions\EditAction;
9+
use Filament\Actions\DeleteBulkAction;
10+
use App\Filament\Resources\AccountResource\Pages\ListAccounts;
11+
use App\Filament\Resources\AccountResource\Pages\CreateAccount;
12+
use App\Filament\Resources\AccountResource\Pages\EditAccount;
513
use App\Filament\Resources\AccountResource\Pages;
614
use App\Filament\Resources\AccountResource\RelationManagers\ContactsRelationManager;
715
use App\Filament\Resources\AccountResource\RelationManagers\DealsRelationManager;
816
use App\Filament\Resources\AccountResource\RelationManagers\LeadsRelationManager;
917
use App\Models\Account;
10-
use Filament\Forms\Components\Group;
11-
use Filament\Forms\Components\Section;
1218
use Filament\Forms\Components\TextInput;
1319
use Filament\Notifications\Notification;
14-
use Filament\Forms\Form;
1520
use Filament\Resources\Resource;
1621
use Filament\Support\RawJs;
1722
use Filament\Tables\Table;
@@ -22,16 +27,16 @@ class AccountResource extends Resource
2227
{
2328
protected static ?string $model = Account::class;
2429

25-
protected static ?string $navigationIcon = 'heroicon-o-building-office';
30+
protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-building-office';
2631

27-
protected static ?string $navigationGroup = 'People';
32+
protected static string | \UnitEnum | null $navigationGroup = 'People';
2833

2934
protected static ?string $recordTitleAttribute = 'name';
3035

31-
public static function form(Form $form): Form
36+
public static function form(Schema $schema): Schema
3237
{
33-
return $form
34-
->schema([
38+
return $schema
39+
->components([
3540
Group::make()
3641
->schema([
3742
Section::make([
@@ -76,11 +81,11 @@ public static function table(Table $table): Table
7681
->filters([
7782
//
7883
])
79-
->actions([
80-
Tables\Actions\EditAction::make(),
84+
->recordActions([
85+
EditAction::make(),
8186
])
82-
->bulkActions([
83-
Tables\Actions\DeleteBulkAction::make()
87+
->toolbarActions([
88+
DeleteBulkAction::make()
8489
->action(function(){
8590
Notification::make()
8691
->title('Now, now, don\'t be cheeky, leave some records for others to play with!')
@@ -102,9 +107,9 @@ public static function getRelations(): array
102107
public static function getPages(): array
103108
{
104109
return [
105-
'index' => Pages\ListAccounts::route('/'),
106-
'create' => Pages\CreateAccount::route('/create'),
107-
'edit' => Pages\EditAccount::route('/{record}/edit'),
110+
'index' => ListAccounts::route('/'),
111+
'create' => CreateAccount::route('/create'),
112+
'edit' => EditAccount::route('/{record}/edit'),
108113
];
109114
}
110115
}

app/Filament/Resources/AccountResource/RelationManagers/ContactsRelationManager.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
namespace App\Filament\Resources\AccountResource\RelationManagers;
44

5+
use Filament\Schemas\Schema;
6+
use Filament\Actions\CreateAction;
7+
use Filament\Actions\EditAction;
8+
use Filament\Actions\DeleteAction;
9+
use Filament\Actions\DeleteBulkAction;
510
use App\Filament\Resources\ContactResource;
611
use App\Models\Contact;
712
use Filament\Forms;
813
use Filament\Forms\Components\TextInput;
914
use Filament\Notifications\Notification;
10-
use Filament\Forms\Form;
1115
use Filament\Resources\RelationManagers\RelationManager;
1216
use Filament\Tables\Table;
1317
use Filament\Tables;
@@ -21,10 +25,10 @@ class ContactsRelationManager extends RelationManager
2125

2226
protected static ?string $recordTitleAttribute = 'name';
2327

24-
public function form(Form $form): Form
28+
public function form(Schema $schema): Schema
2529
{
26-
return $form
27-
->schema([
30+
return $schema
31+
->components([
2832
TextInput::make('name')
2933
->required()
3034
->maxLength(255),
@@ -49,15 +53,15 @@ public function table(Table $table): Table
4953
//
5054
])
5155
->headerActions([
52-
Tables\Actions\CreateAction::make(),
56+
CreateAction::make(),
5357
])
54-
->actions([
55-
Tables\Actions\EditAction::make()
58+
->recordActions([
59+
EditAction::make()
5660
->url(fn(Contact $record) => ContactResource::getUrl('edit', ['record' => $record->id])),
57-
Tables\Actions\DeleteAction::make(),
61+
DeleteAction::make(),
5862
])
59-
->bulkActions([
60-
Tables\Actions\DeleteBulkAction::make()
63+
->toolbarActions([
64+
DeleteBulkAction::make()
6165
->action(function(){
6266
Notification::make()
6367
->title('Now, now, don\'t be cheeky, leave some records for others to play with!')

app/Filament/Resources/AccountResource/RelationManagers/DealsRelationManager.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
namespace App\Filament\Resources\AccountResource\RelationManagers;
44

5+
use Filament\Schemas\Schema;
6+
use Filament\Actions\CreateAction;
7+
use Filament\Actions\EditAction;
8+
use Filament\Actions\DeleteAction;
9+
use Filament\Actions\DeleteBulkAction;
510
use App\Filament\Resources\DealResource;
611
use App\Models\Deal;
712
use Filament\Forms;
813
use Filament\Forms\Components\TextInput;
914
use Filament\Notifications\Notification;
10-
use Filament\Forms\Form;
1115
use Filament\Resources\RelationManagers\RelationManager;
1216
use Filament\Tables\Table;
1317
use Filament\Tables;
@@ -22,10 +26,10 @@ class DealsRelationManager extends RelationManager
2226

2327
protected static ?string $recordTitleAttribute = 'title';
2428

25-
public function form(Form $form): Form
29+
public function form(Schema $schema): Schema
2630
{
27-
return $form
28-
->schema([
31+
return $schema
32+
->components([
2933
TextInput::make('title')
3034
->required()
3135
->maxLength(255)
@@ -59,16 +63,16 @@ public function table(Table $table): Table
5963
])
6064
])
6165
->headerActions([
62-
Tables\Actions\CreateAction::make()
66+
CreateAction::make()
6367
->url(DealResource::getUrl('create')),
6468
])
65-
->actions([
66-
Tables\Actions\EditAction::make()
69+
->recordActions([
70+
EditAction::make()
6771
->url(fn(Deal $record) => DealResource::getUrl('edit', ['record' => $record->id])),
68-
Tables\Actions\DeleteAction::make(),
72+
DeleteAction::make(),
6973
])
70-
->bulkActions([
71-
Tables\Actions\DeleteBulkAction::make()
74+
->toolbarActions([
75+
DeleteBulkAction::make()
7276
->action(function(){
7377
Notification::make()
7478
->title('Now, now, don\'t be cheeky, leave some records for others to play with!')

app/Filament/Resources/AccountResource/RelationManagers/LeadsRelationManager.php

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,16 @@
22

33
namespace App\Filament\Resources\AccountResource\RelationManagers;
44

5+
use Filament\Schemas\Schema;
6+
use Filament\Actions\CreateAction;
7+
use Filament\Actions\Action;
8+
use Filament\Actions\DeleteAction;
9+
use Filament\Actions\DeleteBulkAction;
510
use App\Filament\Resources\LeadResource;
611
use App\Models\Lead;
712
use Filament\Forms;
813
use Filament\Forms\Components\TextInput;
914
use Filament\Notifications\Notification;
10-
use Filament\Forms\Form;
1115
use Filament\Resources\RelationManagers\RelationManager;
1216
use Filament\Support\RawJs;
1317
use Filament\Tables\Table;
@@ -23,10 +27,10 @@ class LeadsRelationManager extends RelationManager
2327

2428
protected static ?string $recordTitleAttribute = 'title';
2529

26-
public function form(Form $form): Form
30+
public function form(Schema $schema): Schema
2731
{
28-
return $form
29-
->schema([
32+
return $schema
33+
->components([
3034
TextInput::make('title')
3135
->required()
3236
->maxLength(255),
@@ -67,17 +71,17 @@ public function table(Table $table): Table
6771
])
6872
])
6973
->headerActions([
70-
Tables\Actions\CreateAction::make(),
74+
CreateAction::make(),
7175
])
72-
->actions([
73-
Tables\Actions\Action::make('edit')
76+
->recordActions([
77+
Action::make('edit')
7478
->label('Edit')
7579
->icon('heroicon-o-pencil-square')
7680
->url(fn(Lead $record) => LeadResource::getUrl('edit', ['record' => $record->id])),
77-
Tables\Actions\DeleteAction::make(),
81+
DeleteAction::make(),
7882
])
79-
->bulkActions([
80-
Tables\Actions\DeleteBulkAction::make()
83+
->toolbarActions([
84+
DeleteBulkAction::make()
8185
->action(function(){
8286
Notification::make()
8387
->title('Now, now, don\'t be cheeky, leave some records for others to play with!')

app/Filament/Resources/ContactResource.php

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,20 @@
22

33
namespace App\Filament\Resources;
44

5+
use Filament\Schemas\Schema;
6+
use Filament\Schemas\Components\Section;
7+
use Filament\Actions\EditAction;
8+
use Filament\Actions\DeleteBulkAction;
9+
use App\Filament\Resources\ContactResource\Pages\ListContacts;
10+
use App\Filament\Resources\ContactResource\Pages\CreateContact;
11+
use App\Filament\Resources\ContactResource\Pages\EditContact;
512
use App\Filament\Resources\ContactResource\Pages;
613
use App\Filament\Resources\ContactResource\RelationManagers;
714
use App\Models\Account;
815
use App\Models\Contact;
9-
use Filament\Forms\Components\Section;
1016
use Filament\Forms\Components\Select;
1117
use Filament\Forms\Components\TextInput;
1218
use Filament\Notifications\Notification;
13-
use Filament\Forms\Form;
1419
use Filament\Resources\Resource;
1520
use Filament\Tables\Table;
1621
use Filament\Tables;
@@ -22,16 +27,16 @@ class ContactResource extends Resource
2227
{
2328
protected static ?string $model = Contact::class;
2429

25-
protected static ?string $navigationIcon = 'heroicon-o-users';
30+
protected static string | \BackedEnum | null $navigationIcon = 'heroicon-o-users';
2631

27-
protected static ?string $navigationGroup = 'People';
32+
protected static string | \UnitEnum | null $navigationGroup = 'People';
2833

2934
protected static ?string $recordTitleAttribute = 'name';
3035

31-
public static function form(Form $form): Form
36+
public static function form(Schema $schema): Schema
3237
{
33-
return $form
34-
->schema([
38+
return $schema
39+
->components([
3540
Section::make()
3641
->schema([
3742
TextInput::make('name')
@@ -47,6 +52,7 @@ public static function form(Form $form): Form
4752
->searchable()
4853
])
4954
->columns(2)
55+
->columnSpanFull()
5056
]);
5157
}
5258

@@ -64,11 +70,11 @@ public static function table(Table $table): Table
6470
->filters([
6571
//
6672
])
67-
->actions([
68-
Tables\Actions\EditAction::make(),
73+
->recordActions([
74+
EditAction::make(),
6975
])
70-
->bulkActions([
71-
Tables\Actions\DeleteBulkAction::make()
76+
->toolbarActions([
77+
DeleteBulkAction::make()
7278
->action(function(){
7379
Notification::make()
7480
->title('Now, now, don\'t be cheeky, leave some records for others to play with!')
@@ -88,9 +94,9 @@ public static function getRelations(): array
8894
public static function getPages(): array
8995
{
9096
return [
91-
'index' => Pages\ListContacts::route('/'),
92-
'create' => Pages\CreateContact::route('/create'),
93-
'edit' => Pages\EditContact::route('/{record}/edit'),
97+
'index' => ListContacts::route('/'),
98+
'create' => CreateContact::route('/create'),
99+
'edit' => EditContact::route('/{record}/edit'),
94100
];
95101
}
96102
}

0 commit comments

Comments
 (0)