贡献者:1
讨论数量: 0
L07 Laravel 教程 - Laravel TDD
/
在本节,我们给Question
问题模型添加一个是否发布的属性,并且用户只能浏览跟回答已发布的问题,而不能对未发布的问题进行操作。
首先我们需要修改ViewQuestionsTest.php
文件,修改测试方法:
tests/Feature/ViewQuestionsTest.php
<?php
namespace Tests\Feature;
use App\Question;
use Carbon\Carbon;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class
本文章首发在 LearnKu.com 网站上。
粤ICP备18099781号-6
|
粤公网安备 44030502004330号
|
违法和不良信息举报
由 Summer 设计和编码 ❤