How do I get the path to a resource in the model? I need to store it in the database and would like the same url as you get from resourcename_path(resource)

Edit
Report