Welcome Guest, Not a member yet? Register   Sign In
Which Provides Better Performance?
#2

These are the fastest ones, but the other ones add some extra functionality e.g. model() gives you a shared instance, so it's a matter on how you store yours, if you get the same performance. If you just make new ones all the time, that are slower again.

Code:
use App\Models\MyModel; + $model=new MyModel(); + $model->myMethod($data);
Code:
$db = $this->db;
Reply


Messages In This Thread
RE: Which Provides Better Performance? - by jreklund - 09-02-2020, 12:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB