reupload
This commit is contained in:
commit
326c677e8d
2800 files changed
+1489388
No files matched your search
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Permissions\User;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
class UserProductPermissionChecker
|
||||
{
|
||||
/**
|
||||
* Does have channel
|
||||
*/
|
||||
protected bool $hasChannel = false;
|
||||
|
||||
/**
|
||||
* Users channel
|
||||
*/
|
||||
protected $channel;
|
||||
|
||||
/**
|
||||
* Permission checker for user's products
|
||||
*/
|
||||
public function __construct(
|
||||
protected User $user
|
||||
) {
|
||||
$this->checkIfHasChannel();
|
||||
}
|
||||
|
||||
/**
|
||||
* Check If Has Channel
|
||||
*/
|
||||
public function checkIfHasChannel(): bool
|
||||
{
|
||||
$this->channel = $this->user->channel();
|
||||
|
||||
return $this->channel ? true : false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all user's products
|
||||
*/
|
||||
public function saveAllProductIds() {}
|
||||
}
|
||||
Reference in new issue
Block a user