-
Notifications
You must be signed in to change notification settings - Fork 11k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[10.x] Add DatabaseChannel::requireDatabaseType() method
- Loading branch information
1 parent
f0d949b
commit de312e5
Showing
3 changed files
with
92 additions
and
3 deletions.
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
25 changes: 25 additions & 0 deletions
25
src/Illuminate/Notifications/Exceptions/DatabaseTypeNotificationMissingException.php
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,25 @@ | ||
<?php | ||
|
||
namespace Illuminate\Notifications\Exceptions; | ||
|
||
use Illuminate\Notifications\Notification; | ||
|
||
class DatabaseTypeNotificationMissingException extends \RuntimeException | ||
{ | ||
/** | ||
* The name of the affected Notification. | ||
*/ | ||
public Notification $notification; | ||
|
||
/** | ||
* Create a new exception instance. | ||
*/ | ||
public function __construct(Notification $notification) | ||
{ | ||
$class = get_class($notification); | ||
|
||
parent::__construct("No database type defined for notification [{$class}]."); | ||
|
||
$this->notification = $notification; | ||
} | ||
} |
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