Welcome Guest, Not a member yet? Register   Sign In
ErrorException
#1
Bug 

Hello Guys i need some help,when I add a new view but an error appears. and then i'm adding a new route
$routes->get('/komik/create', 'Komik::create');  
but the routes still to detail.
APPPATH\Views\komik\Detail.php at line 12
Code:
5 <div class="container">
6     <div class="row">
7         <div class="col">
8             <h2 class="mt-2">Detail Komik</h2>
9             <div class="card mb-3" style="max-width: 540px;">
10                 <div class="row g-0">
11                     <div class="col-md-4">
12                         <img src="/img/<?= $komik['Sampul']; ?>" class="img-fluid rounded-start" alt="">
13                     </div>
14                     <div class="col-md-8">
15                         <div class="card-body">
16                             <h5 class="card-title"><?= $komik['judul']; ?></h5>
17                             <p class="card-text"><b>Penulis : </b><?= $komik['Penulis']; ?></p>
18                             <p class="card-text"><small class="text-muted"><b>Penerbit : </b><?= $komik['Penerbit']; ?></small></p>
19                             <a href="" class="btn btn-warning">Detail Komik</a>
Reply
#2

You should be passing the variables in to your view using $data array.
For links in the view I would use route_to method.

CodeIgniter 4 - route_to
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB