Reputation: 11
I am new to laravel, use the complement Rapyd Laravel, sent me the following problem:
[2014-09-16 02:26:01] production.ERROR: exception 'ErrorException' with message 'Use of undefined constant Autor - assumed 'Autor'' in C:\wamp\www\prueba3\app\controllers\AutorController.php:11
Stack trace:
#0 C:\wamp\www\prueba3\app\controllers\AutorController.php(11): Illuminate\Exception\Handler->handleError(8, 'Use of undefine...', 'C:\wamp\www\pru...', 11, Array)
I hope you can help me, below image link
https://imagizer.imageshack.us/v2/1448x815q90/674/1YVKfP.png
When this use, works well:
$set = DataSet::source("Bib_Autor");
When this use, does not work
$set = DataSet::source(Autor);
Im new... ty
Upvotes: 0
Views: 120
Reputation: 1080
You should instantiate a model or use the Eloquent query builder
$set = DataSet::source(new Autor);
$set = DataSet::source(DB::table("autors"));
as explained here: https://github.com/zofe/rapyd-laravel/wiki/DataSet
Upvotes: 0
Reputation: 60068
You probably meant to change this:
$set = DataSet::source(Autor);
to this
$set = DataSet::source("Autor");
Upvotes: 1