mirror of
https://github.com/cp6/my-idlers.git
synced 2025-06-05 00:28:09 +00:00
Fixed issue 104
This commit is contained in:
parent
c10d77d46b
commit
5797e8c30a
3 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ class OsController extends Controller
|
|||
{
|
||||
public function index()
|
||||
{
|
||||
$os = OS::allOS();
|
||||
$os = OS::allOS()->toArray();
|
||||
return view('os.index', compact(['os']));
|
||||
}
|
||||
|
||||
|
|
|
@ -16,10 +16,10 @@ class OS extends Model
|
|||
|
||||
protected $table = 'os';
|
||||
|
||||
public static function allOS(): array
|
||||
public static function allOS()
|
||||
{
|
||||
return Cache::remember("operating_systems", now()->addMonth(1), function () {
|
||||
return self::orderBy('name')->get()->toArray();
|
||||
return self::orderBy('name')->get();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ class OsSelect extends Component
|
|||
public function render()
|
||||
{
|
||||
return view('components.os-select', [
|
||||
'os' => OS::allOS()
|
||||
'os' => OS::allOS()->toArray()
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue