Created
October 5, 2016 20:39
-
-
Save renanpalmeira/6f288b65c475d43463ba0ef39c07925c to your computer and use it in GitHub Desktop.
Exemplo
This file contains 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 | |
$capsule = new Capsule; | |
$capsule->addConnection($database); | |
$capsule->setAsGlobal(); | |
$capsule->bootEloquent(); |
This file contains 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 | |
class Tabela extends Illuminate\Database\Eloquent\Model { | |
// ... | |
} |
This file contains 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 | |
include 'database.php'; | |
include 'model.php'; | |
Tabela::where(...); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment