576992b365
fixed create function Deleted old update
16 lines
276 B
PHP
16 lines
276 B
PHP
<?php
|
|
|
|
require "../../bootstrap.php";
|
|
|
|
use Backend\Model\Post;
|
|
|
|
if(isset($_POST['id'])){
|
|
$post = Post::query()->find($_POST['id']);
|
|
$post->title = $_POST['upTitle'];
|
|
$post->description = $_POST['upDescription'];
|
|
|
|
if($post->update()){
|
|
return 1;
|
|
}
|
|
}
|