Last active
November 9, 2019 12:37
-
-
Save paulodutra/77ee74f7020a8eda16f09f29b48e7240 to your computer and use it in GitHub Desktop.
1-listagem-de-registros-de-clients-yii2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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