<?php
class MySuperModel extends Eloquent
{
public function mySuperFunction($param1 = null, $param2 = null)
{
return [$param1, $param2, $this->id];
}
}
$model = MySuperModel::find(1); // 1 это ID модели в базе
$result = $model->mySuperFunction(100, 200);
print_r($result);
/*
Array
(
[0] => 100
[1] => 200
[2] => 1 // ID модели $this->id
)
*/