Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
614 B
5
Indexable
Never
<?php

namespace App\Http\Livewire;

use App\Models\Topic;
use Livewire\Component;

class Topics extends Component
{
    public $topics, $title;

    protected $listeners = ['refresh'];

    public function refresh()
    {
        $this->topics = Topic::all();
    }

    public function render()
    {
        $this->topics = Topic::all();


        //return view('livewire.topics')
            //->layout('livewire.topics', ['topics' => $this->topics]);

        return view('livewire.topics')
            ->extends('layout/admin/main')
            ->section('content');

    }
}