bobin56 bobin56 - 8 days ago 7
SQL Question

Laravel Create Model Class with tables that has a schema

i have a very simple question that somehow it might sound stupid but excuse me . I am working on a project where i use sql server with an existing database where table names are having a schema , forexample dob.Tablename . My question is , if i want to create eloquent model for Tablename , how will i name my class ?

Answer

Create new model and add table property:

protected $table = 'existing_table_name';
Comments