<?php

namespace App\Models\Ecommerce\Product\Product\Concerns;

use Laravel\Nova\Nova;

trait ProductFrontEndHelpers
{
    /**
     * Show page
     */
    public function showPage(): string
    {
        return route('web.products.show', ['product' => $this->slug]);
    }

    /**
     * Nova page
     */
    public function novaPage(): string
    {
        return Nova::url('/resources/products');
    }

    /**
     * Nova detail page
     */
    public function novaDetailPage(): string
    {
        return Nova::url('/resources/products/'.$this->id);
    }
}
