Exemplo n.º 1
0
<?php

ini_set('display_errors', 1);
require "vendor/autoload.php";
use Emeka\Junks\Model\Todo;
use Emeka\Todo\Database\Driver;
use Emeka\Todo\Database\Connect;
use Emeka\Todo\Database\Migrations\CreateItemTable as Post;
$todolist = new Todo();
?>


<!DOCTYPE html>
<html>
<head>
    <title>Todo</title>
    <link rel="stylesheet" type="text/css" href="asset/css.css">
    <!-- Compiled and minified CSS -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css">
    <!-- Compiled and minified JavaScript -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
</head>
<body>
    <div class="row">
      <div class="col s6">
        <table>
            <thead>
              <tr>
                  <th data-field="id">Title</th>
                  <th data-field="name">Message</th>
                  <th data-field="price">Created Date</th>
Exemplo n.º 2
0
<?php

ini_set('display_errors', 1);
require "../vendor/autoload.php";
use Emeka\Junks\Model\Todo;
$todolist = new Todo();
$data = [18, "I want to eat", "i want to eat to day", "2007-12-13", "2007-12-13"];
var_dump($todolist->createTodo($data));
if ($todolist->createTodo($data)) {
    echo "done";
} else {
    echo "already  exists data";
}