-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from michaeldyrynda/pr-13
Add many to many support
- Loading branch information
Showing
6 changed files
with
139 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
/vendor/ | ||
composer.lock |
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,24 @@ | ||
<?php | ||
|
||
namespace Iatstuti\Database\Support; | ||
|
||
use Exception; | ||
use Illuminate\Support\Str; | ||
|
||
class CascadeSoftDeleteException extends Exception | ||
{ | ||
public static function softDeleteNotImplemented($class) | ||
{ | ||
return new static(sprintf('%s does not implement Illuminate\Database\Eloquent\SoftDeletes', $class)); | ||
} | ||
|
||
|
||
public static function invalidRelationships($relationships) | ||
{ | ||
return new static(sprintf( | ||
'%s [%s] must exist and return an object of type Illuminate\Database\Eloquent\Relations\Relation', | ||
Str::plural('Relationship', count($relationships)), | ||
join(', ', $relationships) | ||
)); | ||
} | ||
} |
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
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