Skip to content

Instantly share code, notes, and snippets.

@paulodutra
Last active November 9, 2019 12:37
Show Gist options
  • Save paulodutra/77ee74f7020a8eda16f09f29b48e7240 to your computer and use it in GitHub Desktop.
Save paulodutra/77ee74f7020a8eda16f09f29b48e7240 to your computer and use it in GitHub Desktop.
1-listagem-de-registros-de-clients-yii2
<?php
namespace app\controllers;
use app\models\Clients;
use yii\web\NotFoundHttpException;
class ClientsController extends \yii\web\Controller
{
/**
* <b>actionIndex</b> Método responsável por realizar a listagem dos clientes
*/
public function actionIndex()
{
$clients = Clients::find()->all();
return $this->render('index', [
'clients' => $clients
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment