@@ -10,71 +10,71 @@  | 
                                                    ||
| 10 | 10 | |
| 11 | 11 | class MaterialDashboardPro  | 
                                                        
| 12 | 12 |  { | 
                                                        
| 13 | - private Request $request;  | 
                                                        |
| 14 | - private array $menu = [];  | 
                                                        |
| 15 | - private string $pageTitle = 'Page';  | 
                                                        |
| 16 | - private $user = null;  | 
                                                        |
| 13 | + private Request $request;  | 
                                                        |
| 14 | + private array $menu = [];  | 
                                                        |
| 15 | + private string $pageTitle = 'Page';  | 
                                                        |
| 16 | + private $user = null;  | 
                                                        |
| 17 | 17 | |
| 18 | - /**  | 
                                                        |
| 19 | - * @param Request $request  | 
                                                        |
| 20 | - */  | 
                                                        |
| 21 | - public function __construct(Request $request)  | 
                                                        |
| 22 | -    { | 
                                                        |
| 23 | - $this->request = $request;  | 
                                                        |
| 24 | - $this->setMenu();  | 
                                                        |
| 25 | - $this->setUser($this->request->user());  | 
                                                        |
| 26 | - }  | 
                                                        |
| 18 | + /**  | 
                                                        |
| 19 | + * @param Request $request  | 
                                                        |
| 20 | + */  | 
                                                        |
| 21 | + public function __construct(Request $request)  | 
                                                        |
| 22 | +	{ | 
                                                        |
| 23 | + $this->request = $request;  | 
                                                        |
| 24 | + $this->setMenu();  | 
                                                        |
| 25 | + $this->setUser($this->request->user());  | 
                                                        |
| 26 | + }  | 
                                                        |
| 27 | 27 | |
| 28 | - public function getRandomBackgroundUrl(): string  | 
                                                        |
| 29 | -    { | 
                                                        |
| 30 | -        return \sprintf('https://picsum.photos/2880/1920?blur=%d', 2); | 
                                                        |
| 31 | - }  | 
                                                        |
| 28 | + public function getRandomBackgroundUrl(): string  | 
                                                        |
| 29 | +	{ | 
                                                        |
| 30 | +		return \sprintf('https://picsum.photos/2880/1920?blur=%d', 2); | 
                                                        |
| 31 | + }  | 
                                                        |
| 32 | 32 | |
| 33 | - /**  | 
                                                        |
| 34 | - * @return void  | 
                                                        |
| 35 | - */  | 
                                                        |
| 36 | - private function setMenu(): void  | 
                                                        |
| 37 | -    { | 
                                                        |
| 38 | - /** @var MenuBuilder $menuBuilder */  | 
                                                        |
| 39 | - $menuBuilder = resolve(MenuBuilder::class);  | 
                                                        |
| 40 | - $this->menu = $menuBuilder->build();  | 
                                                        |
| 41 | - }  | 
                                                        |
| 33 | + /**  | 
                                                        |
| 34 | + * @return void  | 
                                                        |
| 35 | + */  | 
                                                        |
| 36 | + private function setMenu(): void  | 
                                                        |
| 37 | +	{ | 
                                                        |
| 38 | + /** @var MenuBuilder $menuBuilder */  | 
                                                        |
| 39 | + $menuBuilder = resolve(MenuBuilder::class);  | 
                                                        |
| 40 | + $this->menu = $menuBuilder->build();  | 
                                                        |
| 41 | + }  | 
                                                        |
| 42 | 42 | |
| 43 | - /**  | 
                                                        |
| 44 | - * @param Model|null $user  | 
                                                        |
| 45 | - * @return $this  | 
                                                        |
| 46 | - */  | 
                                                        |
| 47 | - private function setUser(?Model $user): static  | 
                                                        |
| 48 | -    { | 
                                                        |
| 49 | - $this->user = $user;  | 
                                                        |
| 43 | + /**  | 
                                                        |
| 44 | + * @param Model|null $user  | 
                                                        |
| 45 | + * @return $this  | 
                                                        |
| 46 | + */  | 
                                                        |
| 47 | + private function setUser(?Model $user): static  | 
                                                        |
| 48 | +	{ | 
                                                        |
| 49 | + $this->user = $user;  | 
                                                        |
| 50 | 50 | |
| 51 | - return $this;  | 
                                                        |
| 52 | - }  | 
                                                        |
| 51 | + return $this;  | 
                                                        |
| 52 | + }  | 
                                                        |
| 53 | 53 | |
| 54 | - public function hasUser(string $guard = null)  | 
                                                        |
| 55 | -    { | 
                                                        |
| 56 | - return $this->request->user($guard) ?? false;  | 
                                                        |
| 57 | - }  | 
                                                        |
| 54 | + public function hasUser(string $guard = null)  | 
                                                        |
| 55 | +	{ | 
                                                        |
| 56 | + return $this->request->user($guard) ?? false;  | 
                                                        |
| 57 | + }  | 
                                                        |
| 58 | 58 | |
| 59 | - public function getUser()  | 
                                                        |
| 60 | -    { | 
                                                        |
| 61 | - return $this->user;  | 
                                                        |
| 62 | - }  | 
                                                        |
| 59 | + public function getUser()  | 
                                                        |
| 60 | +	{ | 
                                                        |
| 61 | + return $this->user;  | 
                                                        |
| 62 | + }  | 
                                                        |
| 63 | 63 | |
| 64 | - public function getPageTitle(): string  | 
                                                        |
| 65 | -    { | 
                                                        |
| 66 | - return $this->pageTitle;  | 
                                                        |
| 67 | - }  | 
                                                        |
| 64 | + public function getPageTitle(): string  | 
                                                        |
| 65 | +	{ | 
                                                        |
| 66 | + return $this->pageTitle;  | 
                                                        |
| 67 | + }  | 
                                                        |
| 68 | 68 | |
| 69 | - public function setPageTitle(string $pageTitle): static  | 
                                                        |
| 70 | -    { | 
                                                        |
| 71 | - $this->pageTitle = $pageTitle;  | 
                                                        |
| 69 | + public function setPageTitle(string $pageTitle): static  | 
                                                        |
| 70 | +	{ | 
                                                        |
| 71 | + $this->pageTitle = $pageTitle;  | 
                                                        |
| 72 | 72 | |
| 73 | - return $this;  | 
                                                        |
| 74 | - }  | 
                                                        |
| 73 | + return $this;  | 
                                                        |
| 74 | + }  | 
                                                        |
| 75 | 75 | |
| 76 | - public function getMenu(): array  | 
                                                        |
| 77 | -    { | 
                                                        |
| 78 | - return $this->menu;  | 
                                                        |
| 79 | - }  | 
                                                        |
| 76 | + public function getMenu(): array  | 
                                                        |
| 77 | +	{ | 
                                                        |
| 78 | + return $this->menu;  | 
                                                        |
| 79 | + }  | 
                                                        |
| 80 | 80 | }  | 
                                                        
@@ -4,10 +4,10 @@  | 
                                                    ||
| 4 | 4 | |
| 5 | 5 | abstract class Component extends \Illuminate\View\Component  | 
                                                        
| 6 | 6 |  { | 
                                                        
| 7 | - protected static ?string $name = null;  | 
                                                        |
| 7 | + protected static ?string $name = null;  | 
                                                        |
| 8 | 8 | |
| 9 | - public static function getComponentName(): ?string  | 
                                                        |
| 10 | -    { | 
                                                        |
| 11 | - return static::$name;  | 
                                                        |
| 12 | - }  | 
                                                        |
| 9 | + public static function getComponentName(): ?string  | 
                                                        |
| 10 | +	{ | 
                                                        |
| 11 | + return static::$name;  | 
                                                        |
| 12 | + }  | 
                                                        |
| 13 | 13 | }  | 
                                                        
| 14 | 14 | \ No newline at end of file  | 
                                                        
@@ -6,28 +6,28 @@  | 
                                                    ||
| 6 | 6 | |
| 7 | 7 | class CardWidget extends Component  | 
                                                        
| 8 | 8 |  { | 
                                                        
| 9 | - protected static ?string $name = 'card-widget';  | 
                                                        |
| 10 | - public string $title;  | 
                                                        |
| 11 | - public string $description;  | 
                                                        |
| 9 | + protected static ?string $name = 'card-widget';  | 
                                                        |
| 10 | + public string $title;  | 
                                                        |
| 11 | + public string $description;  | 
                                                        |
| 12 | 12 | |
| 13 | - public function __construct($title, $description)  | 
                                                        |
| 14 | -    { | 
                                                        |
| 15 | - $this->title = $title;  | 
                                                        |
| 16 | - $this->description = $description;  | 
                                                        |
| 17 | - }  | 
                                                        |
| 13 | + public function __construct($title, $description)  | 
                                                        |
| 14 | +	{ | 
                                                        |
| 15 | + $this->title = $title;  | 
                                                        |
| 16 | + $this->description = $description;  | 
                                                        |
| 17 | + }  | 
                                                        |
| 18 | 18 | |
| 19 | - /**  | 
                                                        |
| 20 | - * @inheritDoc  | 
                                                        |
| 21 | - */  | 
                                                        |
| 22 | - public function render(): string  | 
                                                        |
| 23 | -    { | 
                                                        |
| 24 | - return view(  | 
                                                        |
| 25 | - sprintf(  | 
                                                        |
| 26 | - '%s::%s',  | 
                                                        |
| 27 | - CoreServiceProvider::VIEWS_NAMESPACE,  | 
                                                        |
| 28 | - 'elements.widgets.simple-card'  | 
                                                        |
| 29 | - )  | 
                                                        |
| 30 | - )  | 
                                                        |
| 31 | - ->render();  | 
                                                        |
| 32 | - }  | 
                                                        |
| 19 | + /**  | 
                                                        |
| 20 | + * @inheritDoc  | 
                                                        |
| 21 | + */  | 
                                                        |
| 22 | + public function render(): string  | 
                                                        |
| 23 | +	{ | 
                                                        |
| 24 | + return view(  | 
                                                        |
| 25 | + sprintf(  | 
                                                        |
| 26 | + '%s::%s',  | 
                                                        |
| 27 | + CoreServiceProvider::VIEWS_NAMESPACE,  | 
                                                        |
| 28 | + 'elements.widgets.simple-card'  | 
                                                        |
| 29 | + )  | 
                                                        |
| 30 | + )  | 
                                                        |
| 31 | + ->render();  | 
                                                        |
| 32 | + }  | 
                                                        |
| 33 | 33 | }  |