In laravel framework i often use - Model::find($id)->orderedBy(param);
I would like to know how to achieve such expression. I began with this:
Class Test
{
static public function write()
{
echo "text no 1";
function second()
{
echo "text no 2";
}
}
}
now i when i do
Test::write();
i get "text no 1"
what i want is to do:
Test::write()->second();
and get " text no 2"
Unfortunately my way doesn't work.
Is it possible ?
Excuse me for bad language - still learning.