Latest Premium Tutorial
-
· 11 mins, 2098 words · premium
Laravel Reverb Demo: Real-Time Notification on Completed Task
Some Laravel tasks are running in the background. What if you want to "listen" for those events to finish? Let's implement exactly this real-time feedback with the Reverb server.
Newest content
-
· 4 mins, 672 words
Filament Dependent Dropdowns in Edit Form: Set Select Values
-
· 1 min, 140 words
Filament: Remove Label Text in Resource Form Page
-
Random Quick Laravel Tip:
Change Format Of Created_at and Updated_atTip given by @syofyanzuhad
To change the format of
created_at
you can add a method in your model like this:Since Laravel 9:
protected function createdAtFormatted(): Attribute{return Attribute::make(get: fn ($value, $attributes) => $attributes['created_at']->format('H:i d, M Y'),);}Laravel 8 and below:
public function getCreatedAtFormattedAttribute(){return $this->created_at->format('H:i d, M Y');}So you can use it
$entry->created_at_formatted
when it's needed. It will return thecreated_at
attribute like this:04:19 23, Aug 2020
.And also for changing format of
updated_at
attribute, you can add this method :Since Laravel 9:
protected function updatedAtFormatted(): Attribute{return Attribute::make(get: fn ($value, $attributes) => $attributes['updated_at']->format('H:i d, M Y'),);}Laravel 8 and below:
public function getUpdatedAtFormattedAttribute(){return $this->updated_at->format('H:i d, M Y');}So you can use it
$entry->updated_at_formatted
when it's needed. It will return theupdated_at
attribute like this:04:19 23, Aug 2020
. -
· 6 mins, 1068 words
Filament Repeater: Set Values Manually or From Other Fields
-
· 4 mins, 716 words
Filament: Money Columns and Storing Value in Cents
-
· 1 min, 193 words
Laravel Jetstream: Redirect After Login
-
Premium Course: Laravel 11 Eloquent: Expert Level
-
· 1 min, 186 words
Filament Select with Relationship: Custom Label for titleAttribute Options
-
· 3 mins, 480 words
Filament Select with Relationship: ModifyQueryUsing for Edit Form
-
· 3 mins, 405 words
Filament Register: Automatically Assign Role from Spatie Permission
-
· 2 mins, 345 words
Filament: Show/Hide Field Based on Select Value with Relationship Column
-
· 2 mins, 249 words
Filament: Show/Hide Fields based on Roles and Permissions