0

挿入用の手順を作成しましたが、コントローラーとモデルでパラメーター「名前」と「パス」を呼び出す方法がわかりません

ストアド プロシージャ:

CREATE DEFINER=`root`@`localhost` 
     PROCEDURE `insert_document_details`
        (IN `name` VARCHAR(50), IN `path` VARCHAR(255) )
BEGIN
    INSERT INTO `document_details`
      (`document_name`, `document_path`) 
    VALUES (name,path);
END

ルート:

Route::post('insert_document_details/{name}/{path}',array('as'=>'insert_document_details',
'uses'=>'AuthorsController@post_document_details'));

オーサーコントローラー:

class AuthorsController extends BaseController{
        public $restful = true;

        public function post_document_details($name,$path)
        {

            $document_details=Response::json(Author::insert_document_details_Call());
            return $document_details;
        }
}

作者(モデル):

class Author extends Eloquent {

    public $table = 'document_details';
    protected $primaryKey = 'id';

    public static function insert_document_details_Call($name,$path)
    {
        return DB::select('call insert_document_details');
    }
}
4

1 に答える 1