1 month ago

Return View dost'nt work

Posted 1 month ago by LetMeKnow

When im acces localhost:8000/tag/1 , he saw blank page without error , i mean , when im click button Edit, my web show to me a Form edit, but there is currently no display.

I have a table like this in index.blade.php

<table class="table table-report sm:mt-2">
                    <th class="text-center whitespace-no-wrap">No.</th>
                    <th class="text-center whitespace-no-wrap">Kategori</th>
                    <th class="text-center whitespace-no-wrap">Aksi</th>
            @foreach ($tag as $result => $hasil )
                <td class="text-center">{{ $result + $tag->firstitem() }}</td>
                <td class="text-center">{{ $hasil->name }}</td>
                <td class="text-center">
                            <div class="flex justify-center items-center">
                                <a class="flex items-center mr-3" href="{{ route('tag.update', $hasil->id ) }}"> <i data-feather="check-square" class="w-4 h-4 mr-1"></i> Ubah </a>
                                <form action="{{ route('tag.destroy', $hasil->id) }}" method="POST">
                                <button type="submit" class="flex items-center text-theme-6"> <i data-feather="trash-2" class="w-4 h-4 mr-1"></i> Hapus </button>

and my edit.blade.php


@section('judul', 'Edit - Tag Berita')

@foreach ($errors-> all(); as $error)
<div class="rounded-md flex items-center px-5 py-4 mb-2 bg-theme-6 text-white"> <i data-feather="alert-octagon" class="w-6 h-6 mr-2"></i> {{ $error }} <i data-feather="x" class="w-4 h-4 ml-auto"></i> </div>

<div> <label>Tag</label> <input type="text" class="input w-full border mt-2" placeholder="Ketikkan Tag" name="name" value="{{ $tags->name }}"> </div><br><br>
<button class="button w-32 mr-2 mb-2 flex items-center justify-center bg-theme-1 text-white"> <i data-feather="plus-circle" class="w-4 h-4 mr-2"></i> Edit Data </button>

in my controllers TagsController.php

   public function edit($id)
        $tags = Tags::findorfail($id);
        return view('adminsuper.tag.edit', compact('tags'));

when im clieck "Edit" my localhost display a blank page.

Please sign in or create an account to participate in this conversation.