26 lines
967 B
PHP
26 lines
967 B
PHP
|
<?php
|
|||
|
require_once "vendor/autoload.php";
|
|||
|
require 'bootstrap.php';
|
|||
|
|
|||
|
use Controllers\Users;
|
|||
|
use Controllers\Questions;
|
|||
|
use Controllers\Answers;
|
|||
|
use Controllers\Posts;
|
|||
|
use Phroute\Phroute\RouteCollector;
|
|||
|
|
|||
|
//$user = Users::create_user("user1", "user1@example.com", "user1_pass");
|
|||
|
//$question = Questions::create_question("Каков смысл жизни?", 7);
|
|||
|
//$answers = Answers::add_answer("Не знаю!", 2, 3);
|
|||
|
//$answers = Answers::add_answer("Плохо", 1, 2);
|
|||
|
//$upvote = Answers::upvote_answer(35, 7);
|
|||
|
//$all = Questions::get_questions_with_answers();
|
|||
|
//$post = Posts::create_post("что-то здесь явно написано!", 5);
|
|||
|
//$all_with_users = Questions::get_questions_with_users();
|
|||
|
//$one_question = Questions::get_question_answers_upvotes(2);
|
|||
|
//$user_question_count = Users::question_count(7);
|
|||
|
$update_answer = Answers::update_answer(1, "This is an updated answer");
|
|||
|
|
|||
|
echo "<pre>";
|
|||
|
print_r($update_answer);
|
|||
|
|
|||
|
$router = new RouteCollector();
|