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
CREATE TABLE `users` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`first_name` varchar(255) NOT NULL, | |
`last_name` varchar(255) NOT NULL, | |
`email` varchar(255) NOT NULL, | |
`phone` varchar(255) NOT NULL, | |
`address` text NOT NULL, | |
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
PRIMARY KEY (`id`) |
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
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php/$1 [L] | |
</IfModule> |
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 | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
use Coolpraz\PhpBlade\PhpBlade; | |
class MY_Controller extends CI_Controller { | |
protected $views = APPPATH . 'views'; | |
protected $cache = APPPATH . 'cache'; | |
protected $blade; | |
public function __construct(){ | |
parent::__construct(); | |
$this->blade = new PhpBlade($this->views, $this->cache); |
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 | |
defined('BASEPATH') OR exit('No direct script access allowed'); | |
class Welcome extends MY_Controller { | |
public function index(){ | |
$head = array(); | |
$data = array(); | |
$this->front_render('home',$data,$head); | |
} | |
} |
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
<!DOCTYPE html> | |
<html lang="en" ng-app="myApp"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<link rel="stylesheet" href="./node_modules/bootstrap/dist/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="./assets/font-awesome/css/font-awesome.min.css"> | |
<link rel="stylesheet" href="./assets/style.css"> | |
<title>Angular Firbase Crud App</title> |
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
var app = angular.module('myApp',['ngRoute']); | |
app.constant('BASEURL', | |
'http://localhost/projects/ngTodo/bkend/' | |
); | |
app.config(function($routeProvider) { | |
$routeProvider | |
.when("/home", { | |
templateUrl : "views/home.html", | |
controller : 'HomeCtrl' | |
}) |
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
<div class="jumbotron text-center"> | |
<h2><b><i class="fa fa-list text-success" aria-hidden="true"></i> <span class="text-success">TASK</span> <i>Manager</i></b></h2> | |
<p>Keep your work up to date.</p> | |
</div> | |
<div class="container-fluid"> | |
<div class="row"> | |
<div class="col-sm-4"> | |
<div class="card"> | |
<div class="card-header"> | |
Add New Task |
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
$route['add-update-task'] = 'TaskCtrl/add_update_task'; | |
$route['get-task'] = 'TaskCtrl/get_task'; | |
$route['action-task'] = 'TaskCtrl/action_task'; |
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 TaskCtrl extends CI_Controller { | |
public function add_update_task() | |
{ | |
$json = file_get_contents('php://input'); | |
$data = json_decode($json, TRUE); | |
$id = $data['id']; | |
$title = $data['title']; | |
$status = $data['status']; | |
$description = $data['description']; |
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
CREATE TABLE `task` ( | |
`id` int(11) NOT NULL AUTO_INCREMENT, | |
`title` varchar(255) DEFAULT NULL, | |
`status` varchar(255) DEFAULT NULL, | |
`description` text, | |
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, | |
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, | |
PRIMARY KEY (`id`) | |
); |