public function nameFile()
    {   
        $slug = strtolower(trim($this->title));

        $slug = preg_replace('/[^a-z0-9-]/', '-', $slug);

        $slug = preg_replace('/-+/', "-", $slug);

        $extension = ($this->template)? "md": "blade.php";

        return sprintf('%s-%s-.%s', date('Y-m-d'), $slug, $extension);
    }