polymorphism - Polymorphic Relations in Laravel naming convenstion -


i going create polymorphic relations in laravel tables old , it's naming conventions not according laravel. can , how ?

of course can set table name , fk column names directly.
on realtion docs , if necessary in laravel api or source code

if have

posts     id - integer     title - string     body - text  comments     id - integer     post_id - integer     body - text  likes     id - integer     likeable_id - integer     likeable_type - string 

then code be

<?php  namespace app;  use illuminate\database\eloquent\model;  class extends model {     /**      * of owning likeable models.      */     public function likeable()     {         return $this->morphto('likeable', 'likeable_type', 'likeable_id');     } }  class post extends model {     /**      * of post's likes.      */     public function likes()     {         return $this->morphmany('app\like', 'likeable', 'likeable_type', 'likeable_id');     } }  class comment extends model {     /**      * of comment's likes.      */     public function likes()     {         return $this->morphmany('app\like', 'likeable', 'likeable_type', 'likeable_id');     } }