Sunday, April 16, 2017

Use Eloquent Model from another table

I'm new into Laravel.

I've created a Model and Controller without a table. "Api.php" and "ApiController.php".

I want to use data from table "sites". So far my model has "protected $table = 'sites';"

Is this enough? How can I test if it get data from it?

Thank you



via altos

Advertisement