-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: category model published to userland
- Loading branch information
Showing
24 changed files
with
238 additions
and
113 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
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
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,9 @@ | ||
<?php | ||
|
||
namespace StarfolkSoftware\Pigeonhole\Events; | ||
|
||
use StarfolkSoftware\Pigeonhole\Events\CategoryEvent; | ||
|
||
class CategoryCreated extends CategoryEvent | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
namespace StarfolkSoftware\Pigeonhole\Events; | ||
|
||
use StarfolkSoftware\Pigeonhole\Events\CategoryEvent; | ||
|
||
class CategoryDeleted extends CategoryEvent | ||
{ | ||
} |
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,29 @@ | ||
<?php | ||
|
||
namespace StarfolkSoftware\Pigeonhole\Events; | ||
|
||
use Illuminate\Broadcasting\InteractsWithSockets; | ||
use Illuminate\Foundation\Events\Dispatchable; | ||
use Illuminate\Queue\SerializesModels; | ||
|
||
abstract class CategoryEvent | ||
{ | ||
use Dispatchable; | ||
use InteractsWithSockets; | ||
use SerializesModels; | ||
|
||
/** | ||
* Create a new event instance. | ||
* | ||
* @param mixed $user | ||
* @param mixed $category | ||
* @param array $data | ||
* @return void | ||
*/ | ||
public function __construct( | ||
public $user = null, | ||
public $category = null, | ||
public $data = [] | ||
) { | ||
} | ||
} |
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,9 @@ | ||
<?php | ||
|
||
namespace StarfolkSoftware\Pigeonhole\Events; | ||
|
||
use StarfolkSoftware\Pigeonhole\Events\CategoryEvent; | ||
|
||
class CategoryUpdated extends CategoryEvent | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
namespace StarfolkSoftware\Pigeonhole\Events; | ||
|
||
use StarfolkSoftware\Pigeonhole\Events\CategoryEvent; | ||
|
||
class CreatingCategory extends CategoryEvent | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
namespace StarfolkSoftware\Pigeonhole\Events; | ||
|
||
use StarfolkSoftware\Pigeonhole\Events\CategoryEvent; | ||
|
||
class DeletingCategory extends CategoryEvent | ||
{ | ||
} |
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,9 @@ | ||
<?php | ||
|
||
namespace StarfolkSoftware\Pigeonhole\Events; | ||
|
||
use StarfolkSoftware\Pigeonhole\Events\CategoryEvent; | ||
|
||
class UpdatingCategory extends CategoryEvent | ||
{ | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace App\Models; | ||
|
||
use StarfolkSoftware\Pigeonhole\Category as PigeonholeCategory; | ||
use StarfolkSoftware\Pigeonhole\Events\CategoryCreated; | ||
use StarfolkSoftware\Pigeonhole\Events\CategoryDeleted; | ||
use StarfolkSoftware\Pigeonhole\Events\CategoryUpdated; | ||
|
||
class Category extends PigeonholeCategory | ||
{ | ||
/** | ||
* The event map for the model. | ||
* | ||
* @var array | ||
*/ | ||
protected $dispatchesEvents = [ | ||
'created' => CategoryCreated::class, | ||
'updated' => CategoryUpdated::class, | ||
'deleted' => CategoryDeleted::class, | ||
]; | ||
} |
Oops, something went wrong.