Laravel 5.8 做个知乎 14 —— 用户关注
摘要:1 创建表 php artisan make:migration create_followers_table --create=followers public function up() { Schema::create('followers', function (Blueprint $tab
阅读全文
Laravel 5.8 做个知乎 15 —— 站内信通知
摘要:1 创建通知表 php artisan notifications:table php artisan migrate 2 代码 2.1 \app\Notifications\NewUserFollowNotinfication.php php artisan make:notification N
阅读全文
Laravel 5.8 做个知乎 13 —— Api token用户认证
摘要:0 设置 config/auth.php 'api' => [ 'driver' => 'token', 'provider' => 'users', 'hash' => true, ], 1 添加users表字段api_token php artisn make:migration add_api
阅读全文
Laravel 5.8 做个知乎 12 —— 关注按钮 Vue js的组件
摘要:1 创建组件 \resources\js\components\QuestionFollowButton.vue <template> <button class="btn " v-text="text" v-on:click="follow" v-bind:class="{'btn-success
阅读全文
Laravel 5.8 做个知乎 11 —— 添加关注 toggle方法 的使用
摘要:1 创建关注表数据 php artisan make:migration create_user_question_table --create=user_question \database\migrations\2021_07_15_002200_create_user_question_tab
阅读全文
Laravel 模板错误 如何快速定位
摘要:Laravel 报错显示的行数指向编译后的文件如何准确定位问题 https://learnku.com/laravel/t/52193
阅读全文
Laravel 5.8 做个知乎 10 —— 添加回答
摘要:1 创建回复表 1.1 创建表 php artisan make:model Answer -m \database\migrations\2021_07_07_131436_create_answers_table.php public function up() { Schema::create
阅读全文
Laravel 5.8 bug修复 在abort方法中自定义提示消息 没有显示
摘要:问题重现 使用第二个参数的时候发现没有传递message abort('404','你可能来到了没有知识的荒漠'); 解决办法 \vendor\laravel\framework\src\Illuminate\Foundation\Exceptions\views\404.blade.php @se
阅读全文
Laravel 5.8 做个知乎 9 —— 编辑问题、显示问题列表 、与创建问题
摘要:1 路由 \routes\web.php //首页重定义 Route::get('/','QuestionsController@index'); Route::resource('questions','QuestionsController',[ 'names'=>[ 'create' =>'q
阅读全文