gpt4 book ai didi

php - 如何在 Laravel 中批准和拒绝事件?

转载 作者:行者123 更新时间:2023-11-29 17:49:45 25 4
gpt4 key购买 nike

我在管理端有事件列表。我想批准和拒绝广告事件。

enter image description here

我的事件架构:

public function up()
{
Schema::create('campaign', function (Blueprint $table) {
$table->engine='InnoDB';

$table->increments('id');
$table->integer('users_id')->unsigned();
$table->foreign('users_id')->references('id')->on('users')
->onDelete('cascade')->onUpdate('cascade');
$table->string('campaign_name');
$table->float('campaign_goal',8,2);
$table->string('discription',400);
$table->string('image');
$table->string('category');
$table->date('start_date');
$table->date('end_date');
$table->float('total_fund',8,2);
$table->boolean('is_approved');
$table->softDeletes();
});
}

如何批准和拒绝广告事件?

最佳答案

您必须在路线上放置或定义分段分隔符。 /=

Route::post('/campaigns/approve{id}','CampaignController@postApprove');

应该是:

  Route::post('/campaigns/approve/{id}','CampaignController@postApprove');

关于php - 如何在 Laravel 中批准和拒绝事件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49485746/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com