第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

SQLSTATE[22P02]: 無效的文本表示形式: 7 錯誤: 無效的整數(shù)輸入語法

SQLSTATE[22P02]: 無效的文本表示形式: 7 錯誤: 無效的整數(shù)輸入語法

PHP
繁花不似錦 2022-09-12 11:11:17
我登錄到我的heroku應用程序,這是一個酒店評論應用程序:http://immense-beach-76879.herokuapp.com/。顯然,它不會顯示我在 http://immense-beach-76879.herokuapp.com/reviews 輸入的數(shù)據(jù)。它只是顯示錯誤。它說了一些關于整數(shù)是錯誤的選擇,因為“kiki”應該是一個字符串,對嗎?如果你需要看我的代碼,這里是:https://github.com/kikidesignnet/hotelreviews。這是我的錯誤:SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for integer: "kiki" (SQL: select * from "reviews" where "user_id" in (1, kiki, k@k.com, ?, 2020-02-07 05:57:47, 2020-02-07 05:57:47) order by "created_at" desc limit 20)我一直在學習本教程,以了解拉拉維爾以及 React/Laravel 如何協(xié)同工作:https://kaloraat.com/articles/laravel-react-crud-tutorial 和他們的 github repo:https://github.com/kaloraat/laravel-react-crud這是我的遷移:create_reviews_table.php<?phpuse Illuminate\Database\Migrations\Migration;use Illuminate\Database\Schema\Blueprint;use Illuminate\Support\Facades\Schema;class CreateReviewsTable extends Migration{    /**     * Run the migrations.     *     * @return void     */    public function up()    {        Schema::create('reviews', function (Blueprint $table) {            $table->increments('id');            $table->integer('user_id')->unsigned()->index();            $table->string('name');            $table->timestamps();        });    }    /**     * Reverse the migrations.     *     * @return void     */    public function down()    {        Schema::dropIfExists('reviews');    }}如您所見,此應用程序應該注冊新用戶。然后,當用戶登錄并提交酒店評論時,reviews.api應該保存數(shù)據(jù)并在評論表單下方顯示評論。我所能看到的是表單正在工作,在下面提交數(shù)據(jù),但它沒有顯示任何達達...
查看完整描述

1 回答

?
BIG陽

TA貢獻1859條經(jīng)驗 獲得超6個贊

您可以在您的方法中更改此行(17)indexApp\Http\Controllers\ReviewController

$allReviews = $review->whereIn('user_id', $request->user())->with('user');

$allReviews = $review->where('user_id', $request->user()->id)->with('user');

$allReviews = $review->where('user_id', \Auth::id())->with('user');


查看完整回答
反對 回復 2022-09-12
  • 1 回答
  • 0 關注
  • 337 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網(wǎng)微信公眾號