28 lines
422 B
PHP
28 lines
422 B
PHP
|
<?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');
|
||
|
}
|
||
|
}
|