*前提、実現したいこと
laravelでオリジナルアプリの作成をしていてherokuでデプロイをしました。
*つまづいたこと
デプロイ後新規会員登録をしようとするとエラーがでできます。
https://gyazo.com/46474a84bc00354b7d7f8ef025267373
*該当するコード
php
1public function up() 2 { 3 Schema::create('users', function (Blueprint $table) { 4 $table->increments('id'); 5 $table->string('name'); 6 $table->string('email')->unique(); 7 $table->string('password'); 8 $table->rememberToken(); 9 $table->timestamps(); 10 }); 11 }
php
1public function up() 2 { 3 Schema::table('users', function (Blueprint $table) { 4 $table->string('gender'); 5 $table->integer('age'); 6 }); 7 8 Schema::table('users', function ($table){ 9 $table->string('stripe_id')->nullable(); 10 $table->string('card_brand')->nullable(); 11 $table->string('card_last_four')->nullable(); 12 $table->timestamp('trial_ends_at')->nullable(); 13 }); 14 15 Schema::create('subscriptions', function ($table){ 16 $table->increments('id'); 17 $table->integer('user_id'); 18 $table->string('name'); 19 $table->string('stripe_id'); 20 $table->string('stripe_plan'); 21 $table->integer('quantity'); 22 $table->timestamp('trial_ends_at')->nullable(); 23 $table->timestamp('ends_at')->nullable(); 24 $table->timestamps(); 25 });
php
1protected function create(array $data) 2 { 3 4 return User::create([ 5 'name' => $data['name'], 6 'gender' => $data['gender'], 7 'age' => $data['age'], 8 'email' => $data['email'], 9 'password' => Hash::make($data['password']), 10 ]); 11 }
また、ローカル環境ですと問題なく登録できます。
*試したこと
ターミナルでcp -p .env.example .env、php artisan key:generateの二つを打ち込みましたが、結果は変わりませんでした。
よろしくお願いします。
追記
local環境でもエラーが発生するようになりました。
https://gyazo.com/e3330c90cd8334acb48b2068cc93a3e2
回答1件
あなたの回答
tips
プレビュー