college-courses/app/Http/Livewire/Components/GridCourse.php

28 lines
422 B
PHP
Raw Normal View History

2024-10-15 10:15:40 +03:00
<?php
namespace App\Http\Livewire\Components;
use App\Models\Course;
use Livewire\Component;
class GridCourse extends Component
{
public $courses;
public function mount()
{
$this->courses = $this->queryCourses();
}
public function queryCourses()
{
return Course::all();
}
public function render()
{
return view('livewire.components.grid-course');
}
}