Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 814
robertrutenge Avatar asked Nov 24 '16 09:11

robertrutenge


1 Answers

Create new model and add table property:

protected $table = 'existing_table_name';
like image 65
Alexey Mezenin Avatar answered Nov 04 '22 07:11

Alexey Mezenin