-
-
Notifications
You must be signed in to change notification settings - Fork 859
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Loss of functionality by casting to array, should be changed. #1033
Comments
/**
* Get a mixed value of custom data and the parameters.
*
* @param array $data
* @param mixed $param
* @return array
*/
public static function getMixedValue(array $data, $param)
{
// $param = self::castToArray($param);
foreach ($data as $key => $value) {
if (isset($param[$key])) {
$data[$key] = $param[$key];
}
}
return $data;
} I commented out the part where it casts the data to array, please let me know if this harms my app in any way. |
Can't recall the idea behind it but I think this is also related to this #641. |
:/ It seem to work well without that, for me. |
@OzanKurt your use case for this is on blade templating right? ->addColumn('html', 'path.to.view') |
yes |
Copy! on v8, I added a
|
BTW, can I get your input on issue #1246? Do you think it's a good move to change the namespace or it will be a hassle for everyone to upgrade? I can revert to old namespace to lessen the BC if others don't like it. Thanks! |
In
src/Helper.php
, why would I cast a useful object to an array and lose all the functionality they provide?For example:
I have a
scheduled_at
column, which should be rendered asd-m-Y H:i
, and I can't use->format()
on it because it has been cast to an array from aCarbon\Carbon
object.The text was updated successfully, but these errors were encountered: