generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
7 changed files
with
87 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
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,21 @@ | ||
<?php | ||
|
||
namespace Bilfeldt\LaravelFlashMessage\View\Components; | ||
|
||
use Illuminate\View\Component; | ||
|
||
abstract class AbstractAlert extends Component | ||
{ | ||
public string $text; | ||
public string $title; | ||
public array $messages; | ||
public array $links; | ||
|
||
public function __construct(string $text, string $title = '', array $messages = [], array $links = []) | ||
{ | ||
$this->text = $text; | ||
$this->title = $title; | ||
$this->messages = $messages; | ||
$this->links = $links; | ||
} | ||
} |
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,11 @@ | ||
<?php | ||
|
||
namespace Bilfeldt\LaravelFlashMessage\View\Components; | ||
|
||
class AlertError extends AbstractAlert | ||
{ | ||
public function render() | ||
{ | ||
return view('flash-message::components.alert-error'); | ||
} | ||
} |
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,11 @@ | ||
<?php | ||
|
||
namespace Bilfeldt\LaravelFlashMessage\View\Components; | ||
|
||
class AlertInfo extends AbstractAlert | ||
{ | ||
public function render() | ||
{ | ||
return view('flash-message::components.alert-info'); | ||
} | ||
} |
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,11 @@ | ||
<?php | ||
|
||
namespace Bilfeldt\LaravelFlashMessage\View\Components; | ||
|
||
class AlertMessage extends AbstractAlert | ||
{ | ||
public function render() | ||
{ | ||
return view('flash-message::components.alert-message'); | ||
} | ||
} |
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,11 @@ | ||
<?php | ||
|
||
namespace Bilfeldt\LaravelFlashMessage\View\Components; | ||
|
||
class AlertSuccess extends AbstractAlert | ||
{ | ||
public function render() | ||
{ | ||
return view('flash-message::components.alert-success'); | ||
} | ||
} |
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,11 @@ | ||
<?php | ||
|
||
namespace Bilfeldt\LaravelFlashMessage\View\Components; | ||
|
||
class AlertWarning extends AbstractAlert | ||
{ | ||
public function render() | ||
{ | ||
return view('flash-message::components.alert-warning'); | ||
} | ||
} |