Untitled

 avatar
unknown
plain_text
3 years ago
614 B
6
Indexable
<?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');

    }
}
Editor is loading...