I just found this in a laravel bundle that I just installed, and really have no idea what with() is… as it isn’t declared any where
public static function of($query)
{
$ins = with(new static); // What is with(new static) ?
$ins->save_query($query);
return $ins;
}
with()is not a statement but a user defined function in Laravel framework.From laravel documentation :