samedi 26 décembre 2020

Doctrine/DBAL/Schema/SchemaException - There is no column with name

Laravel version 5.5

Database mysql

use Illuminate\Support\Facades\DB;

class InvoiceController extends Controller
{
    public function GenerateInvoice()
    {
        $data_type = DB::getSchemaBuilder()->getColumnType('order', 'invoice_no');
        dump($data_type);
    }
}

I use Schema Builder to get the column data type of invoice_no from table order but end up with this error.

SchemaException {#472 ▼
  #message: "There is no column with name 'invoice_no' on table 'order'."
  #code: 30
  #file: "/home/server/public_html/order/vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SchemaException.php"
  #line: 82
  trace: {▶}
}

I am new to Laravel. Please tell me what should I do!



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/34LauLV
via IFTTT

Aucun commentaire:

Enregistrer un commentaire