Skip to content

Commit

Permalink
fix othograph
Browse files Browse the repository at this point in the history
  • Loading branch information
mel gibson committed May 23, 2024
1 parent 966b729 commit b560901
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Http/Resources/PropositionResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
use Illuminate\Support\Carbon;

class PropositionResource extends JsonResource
{
Expand All @@ -18,7 +19,8 @@ public function toArray(Request $request): array
'id'=>$this->id,
'produit_id'=> $this->produit_id,
'created_at'=> $this->created_at,
'updated_at'=> $this->updated_at,
'updated_at'=> (new Carbon($this->updated_at)),
'updated_at_humans'=> (new Carbon($this->updated_at))->diffForHumans(),
'produit'=> $this->produit->nom,
'image'=> asset('storage/'.$this->produit->image_produits()->first()?->path),
'boutique_id'=> [
Expand Down

0 comments on commit b560901

Please sign in to comment.