update
This commit is contained in:
@ -42,6 +42,7 @@ class WebsiteController extends AbstractController
|
||||
$model->app_logo = $this->request->post('app_logo');
|
||||
$model->app_extra = $this->request->post('app_extra');
|
||||
$model->app_template = $this->request->post('template');
|
||||
$model->app_extra_tag = $this->request->post('app_extra_tag');
|
||||
$model->save();
|
||||
|
||||
return $this->response->json([]);
|
||||
@ -110,6 +111,7 @@ class WebsiteController extends AbstractController
|
||||
$query->app_logo = $this->request->post('app_logo');
|
||||
$query->app_extra = $this->request->post('app_extra');
|
||||
$query->app_template = $this->request->post('template');
|
||||
$query->app_extra_tag = $this->request->post('app_extra_tag');
|
||||
|
||||
$query->save();
|
||||
|
||||
|
@ -38,6 +38,7 @@ class NewsFormModel
|
||||
$model->description = $this->attributes['description'];
|
||||
$model->cover = $this->attributes['cover'];
|
||||
$model->content = $this->attributes['content'];
|
||||
$model->platform = $this->attributes['platform'];
|
||||
$model->save();
|
||||
}
|
||||
}
|
@ -23,6 +23,9 @@ namespace App\Model;
|
||||
* @property string $app_extra
|
||||
* @property string $app_logo
|
||||
* @property int $app_template
|
||||
* @property string $app_telephone
|
||||
* @property string $app_download_url
|
||||
* @property string $app_extra_tag
|
||||
*/
|
||||
class AppWebsiteConfig extends Model
|
||||
{
|
||||
|
@ -46,10 +46,11 @@ class NewsService extends BaseService
|
||||
* @param int $page
|
||||
* @return array
|
||||
*/
|
||||
public function index(int $limit = 30, int $page = 1): array
|
||||
public function index(int $id, int $limit = 30, int $page = 1): array
|
||||
{
|
||||
$query = AppNews::formatQuery(['created_at'])
|
||||
->where('is_delete', 0)
|
||||
->where('platform', $id)
|
||||
->select(['id'])
|
||||
->orderBy('id', 'desc');;
|
||||
$pagination = $query->paginate($limit, page: $page);
|
||||
|
Reference in New Issue
Block a user