2022-12-05 23:01:12 +08:00
|
|
|
<?php
|
|
|
|
|
2023-01-11 17:17:36 +08:00
|
|
|
namespace Modules\Common\Http\Controllers;
|
2022-12-05 23:01:12 +08:00
|
|
|
|
|
|
|
use Exception;
|
2023-01-11 17:17:36 +08:00
|
|
|
use Modules\Common\Repository\Options\Factory;
|
2022-12-05 23:01:12 +08:00
|
|
|
|
|
|
|
class OptionController
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param $name
|
|
|
|
* @param Factory $factory
|
|
|
|
* @return array
|
|
|
|
* @throws Exception
|
|
|
|
*/
|
|
|
|
public function index($name, Factory $factory): array
|
|
|
|
{
|
|
|
|
return $factory->make($name)->get();
|
|
|
|
}
|
|
|
|
}
|