Open thegarlynch opened 3 years ago
literally there is no use of comment now other than typehinting and it is hard to watch the development of this framework. just today when i look at documentation i can see new argument
$joinings
increateMany
ofBelongsToMany
. i can't see the documentation anywhere on internet nor can i see it on official documentation/** * Create an array of new instances of the related models. * * @param iterable $records * @param array $joinings <- what is this ?? * @return array */ public function createMany(iterable $records, array $joinings = []) { }
as documention said
Once we save the related model, we need to attach it to the base model via through intermediate table so we'll use the existing "attach" method to accomplish this which will insert the record and any more attributes.
$joining is a set of values that sit beside the keys in pivot table
for example : user_id, business_id, level, salary
level and salary is $joining
Will it cost php performance for laravel comment to be a bit long ? aside from that i can't understand why this kind of documentation is prevalence here.
PHP is not the best language for documenting meanings of the variables because the meanings can change. For instance, where($column, $operator, $value)
can sometimes become where($column, $value)
with $operator
being =
implicitly. So then, the second argument - is it operator or value? lol. The best way is to read the docs.
The example above isn't an anomaly. It's everywhere - query builder, middleware, collections, etc.
Why not made documentation aboutt the overload ? it is not that hard. just include a sample for each one
it is not that hard. just include a sample for each one
It's not that hard to do it for this one method you're interested in. Doing it across the framework is a colossal task.
step by step. make it better as soon as you find it. i would help. but i don't yen know that is even in laravel spec
literally there is no use of comment now other than typehinting and it is hard to watch the development of this framework. just today when i look at documentation i can see new argument
$joinings
increateMany
ofBelongsToMany
. i can't see the documentation anywhere on internet nor can i see it on official documentation