ItemPost and ServicePost models are inheriting Post model:

namespace App\Models;

class Post
{
}

class ItemPost extends Post
{
}

class ServicePost extends Post
{
}

Then which one of the followings is a good or bad practice? And why?

namespace App\Http\Controllers;
use App\Models\ItemPost as Post;
class ItemPostController
{
    public function __construct(Post $post)
    {
    }
}

OR

namespace App\Http\Controllers;
use App\Models\ServicePost;
class ServicePostController
{
    public function __construct(ServicePost $post)
    {
    }
}
share|improve this question

put on hold as off-topic by Hosch250, janos 2 days ago

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.