Skip to content

Commit

Permalink
Changelog:
Browse files Browse the repository at this point in the history
- Added: properties to middleware events
- Fixed: autoloaded localization wasn't loaded
- Fixed: crud.blade.php for generating crud classes
  • Loading branch information
Blair2004 committed Apr 23, 2024
1 parent cb7fa84 commit dd11958
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion app/Events/AfterAppHealthCheckedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

namespace App\Events;

use Closure;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Http\Request;
use Illuminate\Queue\SerializesModels;

class AfterAppHealthCheckedEvent
Expand All @@ -15,7 +17,7 @@ class AfterAppHealthCheckedEvent
*
* @return void
*/
public function __construct()
public function __construct( public Closure $next, public Request $request )
{
//
}
Expand Down
4 changes: 3 additions & 1 deletion app/Events/InstalledStateBeforeCheckedEvent.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

namespace App\Events;

use Closure;
use Illuminate\Broadcasting\InteractsWithSockets;
use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Http\Request;
use Illuminate\Queue\SerializesModels;

class InstalledStateBeforeCheckedEvent
Expand All @@ -15,7 +17,7 @@ class InstalledStateBeforeCheckedEvent
*
* @return void
*/
public function __construct()
public function __construct( public Closure $next, public Request $request )
{
//
}
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Middleware/CheckApplicationHealthMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function handle( Request $request, Closure $next )
$modules = app()->make( ModulesService::class );
$modules->dependenciesCheck();

AfterAppHealthCheckedEvent::dispatch();
AfterAppHealthCheckedEvent::dispatch( $next, $request );

return $next( $request );
}
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/LocalizationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function boot()
protected function loadModuleLocale()
{
$moduleService = app()->make( ModulesService::class );
$active = $moduleService->getEnabled();
$active = $moduleService->getEnabledAndAutoloadedModules();

foreach ( $active as $module ) {
if (
Expand Down
2 changes: 1 addition & 1 deletion app/Providers/TelescopeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
*/
public function register(): void
{
// Telescope::night();
Telescope::night();

$this->hideSensitiveRequestDetails();

Expand Down
4 changes: 2 additions & 2 deletions resources/views/generate/crud.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ public function beforeDelete( $namespace, $id, $model ): void
*/
public function getColumns(): array
{
return CrudTable::column(
return CrudTable::columns(
@foreach( $Schema::getColumnListing( $table_name ) as $column )
CrudTable::column(
identifier: '{{ $column }}',
Expand All @@ -315,7 +315,7 @@ public function getColumns(): array
/**
* Define row actions.
*/
public function addActions( CrudEntry $entry ): CrudEntry
public function setActions( CrudEntry $entry ): CrudEntry
{
/**
* Declaring entry actions
Expand Down

0 comments on commit dd11958

Please sign in to comment.