mirror of
https://gitlab.com/uldvstar/exchange-2.0.git
synced 2026-08-19 04:24:16 +00:00
5940fd16b0
Currency Converter Logic Class
45 lines
786 B
PHP
45 lines
786 B
PHP
<?php
|
|
|
|
namespace App\Classes\Modules\Currencies\Standards\Rules;
|
|
|
|
use App\Classes\General\Abstracts\AbstractRule;
|
|
use App\Classes\Modules\Segments\DataTransferObjects\CurrencyObject;
|
|
|
|
class CanListCurrency extends AbstractRule
|
|
{
|
|
/**
|
|
* @return bool
|
|
*/
|
|
protected function authorized(): bool
|
|
{
|
|
// TODO Set Authorization rules
|
|
|
|
if (!\Auth::user()->can('view currency')) {
|
|
return false;
|
|
}
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
/**
|
|
* @param CurrencyObject $object
|
|
* @return bool
|
|
*/
|
|
protected function validators($object): bool
|
|
{
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* @param CurrencyObject $object
|
|
* @return bool
|
|
*/
|
|
protected function criteria($object): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
} |