I made a store procedure in mysql named 'Insertusers' having 8 parameters in it.
Now i want to call this procedure using my model and insert value in table using this procedure.
Here is my Model's code :
<?php
class Insertuser extends Eloquent {
protected $guarded = array();
public static function storedProcedureCall() {
return DB::statement('Insertusers');
}
public static $rules = array();
}
?>
Here is my Controllers' code :
public function createUser() {
$clan = new Insertuser;
$clan->clanname = Input::get('clanname');
$clan->description = Input::get('tbx_new_clan_Des');
if (Input::get('chk_new_clan_Status')) {
$clan->active = true;
} else {
$clan->active = false;
}
if (Input::get('chk_new_clan_Incoming')) {
$clan->allow_incoming = true;
} else {
$clan->allow_incoming = false;
}
if (Input::get('chk_new_clan_key')) {
$clan->clan_key = Input::get('tbx_new_clan_key');
}
$clan->created_by = Session::get('userid');
$clan->last_updated_by = Session::get('userid');
$clan->DOMType=1;
$clan->save();
}
When i tried to create a user, i am getting the following error :
SQLSTATE[42S02]: Base table or view not found.
Please help me out. Thanks.