v0.1.2 - Added edit function
fixed create function Deleted old update
This commit is contained in:
@@ -5,7 +5,10 @@ use Backend\Model\Post;
|
||||
|
||||
header('Content-Type: application/json;charset=UTF-8');
|
||||
|
||||
$data = Post::all();
|
||||
if(isset($_POST['id']))
|
||||
$data = Post::find($_POST['id']);
|
||||
else
|
||||
$data = Post::all();
|
||||
echo $data;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user