<?php
/**
 * Created by PhpStorm.
 * User: ywlministrator
 * Date: 2023/3/10
 * Time: 11:05
 */
$app = app();
$languagePath = '';
if(config('app.language_path')) {
    $languagePath = config('app.language_path').'/';
}
$app->router->group(['namespace' => 'App\Ad\Controllers',
    'prefix' => $languagePath.'api'], function ($router) {

    $router->group(['middleware' =>['admin.auth']], function ($router) {
        //保存广告设置
        $router->post('ad/save-ad', 'AdController@saveAd');
        // 更改广告状态
        $router->post('ad/set-ad-status', 'AdController@changeStatus');
        //获取广告列表
        $router->get('ad/get-list', 'AdController@getAdList');
        //获取广告位列表
        $router->get('ad/get-position-list', 'AdController@getAdPositionList');
    });
});
