vendredi 15 novembre 2019

Error SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table in Laravel

I want to create a filter between two tables with different schemas in postgresql with the query builder laravel

the first table named Customer_clinet is in the master schema with columns: id, customer_id, and vendor_id

the second table named vendors is in a public schema with columns: id, name, type, status

I want to make a filter for example if I input in the controller ClientVendor@filter :

'client_id' = 1
'status' = active
'type' = marketplace

then automatically filter the data in the schema master in the vendor table

    $users = DB::table('master.clients_vendor')
            ->join('public.vendors', 'vendor_id.id', '=', 'vendors.id')
            ->get();
            return response()->json($users);

in my controller just trying to connect between tables but an error message appears



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire