📜  评论 = 评论::find($this->route('comment'));在 laravel - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:40.403000             🧑  作者: Mango

代码示例1
Schema::create('comments', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned();
            $table->foreign('user_id')->references('id')->on('users')->onCascade('update')->onDelete('cascade');
            $table->integer('post_id')->unsigned();
            $table->foreign('post_id')->references('id')->on('users')->onCascade('update')->onDelete('cascade');
            $table->text('comment');
            $table->timestamps();
            $table->rememberToken();
        });