を見つけていないビューは、私が間違っているものを見つけることを試みるが、私はそれを見つけることができませんLaravelベーステーブルまたは
マイ移行ファイル:の
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateClientProjectTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('client_project', function(Blueprint $table)
{
$table->increments('id');
$table->integer('client_id');
$table->integer('project_id');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('client_project');
}
}
ファーストすべて、私はチェックテーブルが作成され、それがあります。その後
、controller
への呼び出し
route
はこれです:
$client_project = new Client_Project();
$client_project->client_id = DB::table('clients')->orderby('id','DESC')->take(1)->get();
$client_project->project_id = DB::table('projects')->orderby('id','DESC')->take(1)->get();
$client_project->save();
とエラー:
Base table or view not found: 1146 Table 'web.client__projects' doesn't exist
Route::post('projectsclients/postUpload', ['uses' => '[email protected]', 'as' => 'admin.projectsclients.store']);
機能はここのように見えます(admin
が付けられ)
問題は私のテーブルはですはclient__projects
ではありません。
私はこれを修正する必要がありますか?
ありがとう、どんな助けもありがとうございます。
を、関連するセクションを読んでお勧めの命名規則について学ぶために、あなたのテーブル名でのごClient_Projectモデルが –
正しいか間違っているか、あなたのClient_Projectモデルを表示し確認してください –
私の答えがあなたの解決策なら、答えとしてこの解決策を追加し、私の答えを受け入れるでしょう –