Tanya - class SiteController itu buat apa ya?

Juan.wmv
Juan Christian
2019-09-14 16:35:53

class SiteController extends Controller
{
    public function actionIndex()
    {
        $student = new Student;
        $student = $student->findAll();
        foreach ($student as $data) {
            echo <<<HTML
<li><a href="student/index/{$data->id}">{$data->name}</a></li>
HTML;
        }
    }
}

Showing 1-2 of 2 items.
rafifahrezi
Rafi Fahrezi
2019-09-14 18:41:37
bang @ariefsiswanto bagi link yg boostrap tadi dund?
admin
Arief Siswanto
2019-09-14 21:03:21
contoh penggunaan siteController actionIndex menghasilkan localhost/proyeknya/site/index articleController actionIndex menghasilkan localhost/proyeknya/article/index ini aturan default di beberapa framework php seperti yii2, codeigniter dan laravel