mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
Refactor BaseComponent to initialize route parameters in the boot method
This commit is contained in:
1 parent
6220172f70
commit
a6259d8a52
1 file changed
+20
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
abstract class BaseComponent extends Component
|
||||
{
|
||||
public $parameters = [];
|
||||
|
||||
public function boot()
|
||||
{
|
||||
$this->parameters = $this->getRouteParameters();
|
||||
}
|
||||
|
||||
protected function getRouteParameters()
|
||||
{
|
||||
return get_route_parameters();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user