Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use multiple implements in laravel model

Tags:

php

laravel

How can I have multiple implements in my model?

my current model is like this:

class Post extends Model implements ViewableContract
{
........
}

now i need to add implements Feedable as well.

should i use comma in between or put them in brackets or what?

like image 524
mafortis Avatar asked Apr 13 '19 04:04

mafortis


Video Answer


1 Answers

Yeah! you can use comma in between the ViewableContract and Feedable like this:

class Post extends Model implements ViewableContract, Feedable
{
.....
}
like image 89
Inzamam Idrees Avatar answered Oct 27 '22 14:10

Inzamam Idrees