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\Repositories\Usuario; | |
| class CadastrarUsuarioMemoriaRepository implements CadastrarUsuarioRepository | |
| { | |
| private $name; | |
| private $email; | |
| private $password; | |
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\Repositories\Usuario; | |
| class CadastrarUsuarioPdoRepository implements CadastrarUsuarioRepository | |
| { | |
| private $name; | |
| private $email; | |
| private $password; | |
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\Repositories\Usuario; | |
| interface CadastrarUsuarioRepository | |
| { | |
| public function __construct(string $name, string $email, string $password); | |
| public function execute(): bool; | |
| } |
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\Repositories\Usuario; | |
| class CadastrarUsuarioRepository | |
| { | |
| private $name; | |
| private $email; | |
| private $password; | |
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 | |
| $dbname = 'dbname'; | |
| $user = 'user'; | |
| $password = 'password'; | |
| $dbh = new PDO('mysql:host=localhost;dbname='.$dbname, $user, $password); | |
| $tables = $dbh->query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA='{$dbname}'"); |
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 | |
| $dbname = 'dbname'; | |
| $user = 'username'; | |
| $password = 'password'; | |
| $dbh = new PDO('mysql:host=localhost;dbname='.$dbname, $user, $password); | |
| $tables = $dbh->query("SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA='{$dbname}'"); | |
| foreach($tables as $row) { | |
| $name = $row[0]; |
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 | |
| // pegue todos os arquivos .php dentro do diretório views | |
| $files = glob('path/views/*.php'); | |
| foreach ($files as $file) { | |
| // altere a extensão de .php para .blade.php | |
| $newFile = preg_replace('/\.php$/', '.blade.php', $file); | |
| rename($file, $newFile);| | |
| // | |
| $content = file_get_content($newFile); |
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
| {"lastUpload":"2022-01-04T14:05:49.031Z","extensionVersion":"v3.4.3"} |
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
| const venom = require('venom-bot'); | |
| venom | |
| .create() | |
| .then((client) => start(client)) | |
| .catch((erro) => console.error(erro)); | |
| function start(client) { | |
| console.log("- O venom foi iniciado com sucesso! ;D"); | |
| } |
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
| {"lastUpload":"2021-05-12T21:22:46.157Z","extensionVersion":"v3.4.3"} |