-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
247 additions
and
129 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
namespace App\Config; | ||
|
||
class Database { | ||
public static function db(){ | ||
return [ | ||
"default" => array( | ||
"server" => "localhost", | ||
"user" => "root", | ||
"pass" => "", | ||
"dbname" => "pms_db", | ||
"driver" => "mysql" | ||
) | ||
]; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,24 @@ | ||
<?php | ||
class Home extends Controller{ | ||
namespace App\Controller; | ||
|
||
public function __construct() | ||
class Home{ | ||
|
||
public static function index() | ||
{ | ||
$data = array("header" => "Simple PHP MVC Framework", | ||
"sub_header" => "Just what you need!"); | ||
$this->view("section/header"); | ||
$this->view("home",$data); | ||
$this->view("section/footer"); | ||
view("section/header"); | ||
view("home",$data); | ||
view("section/footer"); | ||
} | ||
|
||
public static function samplePost($post_data){ | ||
public static function samplePost($postData){ | ||
//now you can get values from POST request | ||
var_dump($postData); | ||
} | ||
|
||
public static function sampleGet($get_data){ | ||
public static function sampleGet($getData){ | ||
//now you can get values from GET request | ||
//fdsfsd | ||
var_dump($getData); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.