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 | |
require_once(__dir__ . '/Db.php'); | |
class RegisterModel extends Db { | |
/** | |
* @param array | |
* @return array | |
* @desc Creates and returns a user record.... | |
**/ | |
public function createUser(array $user) :array |
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 | |
require_once(__dir__ . '/Controller.php'); | |
require_once('./Model/DashboardModel.php'); | |
class Dashboard extends Controller { | |
public $active = 'dashboard'; //for highlighting the active link... | |
private $dashboardModel; | |
/** | |
* @param null|void |
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 | |
require_once(__dir__ . '/Controller.php'); | |
require_once('./Model/LoginModel.php'); | |
class Login extends Controller { | |
public $active = 'login'; //for highlighting the active link... | |
private $loginModel; | |
/** |
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 | |
require_once(__dir__ . '/Controller.php'); | |
require_once('./Model/RegisterModel.php'); | |
class Register extends Controller { | |
public $active = 'Register'; //for highlighting the active link... | |
private $registerModel; | |
/** | |
* @param null|void |
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 | |
require_once(__dir__ . '/Controller.php'); | |
class Logout extends Controller { | |
/** | |
* @param null|void | |
* @return null|void | |
* @desc Destroys the application session and redirects to the login page... | |
**/ |
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 | |
define("BASE_URL", 'http://localhost/' . basename(__DIR__) . '/'); | |
?> |
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
const _ = require('lodash'); | |
/****************************************************************/ | |
/************ Custom Module Imports *********************/ | |
/****************************************************************/ | |
const Controller = require('./Controller'); | |
const ContinentModel = require('../model/ContinentModel'); | |
class ContinentController extends Controller { | |
constructor() { |
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
{ | |
"name": "node-cli-app", | |
"version": "1.0.0", | |
"description": "A cli app in node js for getting details about the weather.", | |
"main": "index.js", | |
"scripts": { | |
"test": "echo \"Error: no test specified\" && exit 1" | |
}, | |
"repository": { | |
"type": "git", |
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
//Node Modules.... | |
const Yargs = require('yargs'); | |
//Custom Modules.... | |
const Notes = require('./app/Notes'); | |
const Weather = require('./app/Weather'); | |
//App Initialization... | |
const YargsArgV = Yargs | |
.command('add', 'Adds A New Note', { |
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
const { MongoClient } = require('mongodb'); | |
const _ = require('lodash'); | |
class Notes { | |
constructor() { } | |
// Create A New Mongo Connection... | |
async createConnection() { | |
// Mongo Config || Constants..... | |
const Url = 'mongodb://localhost:27017'; |