laravel blade date format
//laravel method 1
{{ $data->created_at->isoFormat('dddd D') }}
//laravel method 2
{!! date('d/M/y', strtotime($data->created_at)) !!}
laravel blade date format
//laravel method 1
{{ $data->created_at->isoFormat('dddd D') }}
//laravel method 2
{!! date('d/M/y', strtotime($data->created_at)) !!}
casts in model laravel
Once the cast is defined, you may access
the options attribute and
it will automatically be deserialized
from JSON into a PHP array. When you set
the value of the options attribute, the given
array will automatically be serialized back into
JSON for storage:
use App\Models\User;
$user = User::find(1);
$options = $user->options;
$options['key'] = 'value';
$user->options = $options;
$user->save();
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us