在两个解决方案中,我的控制器类分布在多个项目上。在解决方案A中,路由按照预期工作,在solutionB中不起作用。我不知道为什么?
[ApiController]
[Route("/api/[controller]")]
public abstract class ApiControllerBase : ControllerBase, IController
{
...
}
public class ApiCrudControllerBase<T> : ApiControllerBase where T : IModel, new()
{
...
}
[Rout
我的系统中有两种型号,专利和PatentApplicant。因此,PatentApplicant迁移定义了外键:
$table->integer('patent_id')->unsigned();
$table->foreign('patent_id')->references('id')->on('patents');
在我的专利模型中,这种关系的定义如下:
public function applicant() {
return $this->belongsTo('App\M