This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
<?php | |
namespace App\Helper; | |
use DateTimeImmutable; | |
use Doctrine\ORM\QueryBuilder; | |
class QueryBuilderToSql | |
{ | |
/** |
<?php | |
namespace App\Doctrine; | |
use Doctrine\ORM\Mapping\DefaultNamingStrategy; | |
use Doctrine\ORM\Mapping\NamingStrategy; | |
class CustomNamingStrategy extends DefaultNamingStrategy implements NamingStrategy | |
{ | |
/** |
Если страна отеля (равно | не равно) countries.id | |
SELECT * | |
FROM countries | |
JOIN cities ON countries.id = cities.country_id | |
JOIN hotels ON cities.id = hotels.city_id | |
WHERE countries.id = 1 AND hotels.id = 1 | |
Если город отеля (равно | не равно) cities.id |
CREATE TABLE users ( | |
id INT AUTO_INCREMENT PRIMARY KEY, | |
username VARCHAR(255) NOT NULL UNIQUE, | |
password VARCHAR(255) NOT NULL | |
); | |
CREATE TABLE conversations ( | |
id INT AUTO_INCREMENT PRIMARY KEY, | |
name VARCHAR(255) NOT NULL, | |
created_at DATETIME DEFAULT CURRENT_TIMESTAMP |
sudo service mysql stop | |
sudo service mysql start |
// https://codepen.io/chen1223/details/pqZWbg | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<style> | |
@import url('https://fonts.googleapis.com/css?family=Roboto+Condensed'); |
<section> | |
<div class="img"> | |
<div class="img-container"> | |
<img src="https://images.unsplash.com/photo-1498598457418-36ef20772bb9?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1200&q=80" /> | |
</div> | |
</div> | |
</section> | |
<section> | |
<div class="img"> | |
<div class="img-container"> |
// app/Repositories/${NAME}Repository | |
<?php | |
#parse("PHP File Header.php") | |
namespace App\Repositories; | |
class ${NAME}Repository implements ${NAME}RepositoryInterface | |
{ |
<?php | |
class UserRepository | |
{ } | |
class UserController { | |
private $userRepository; | |
public function __construct(UserRepository $repository) | |
{ |