src/Chronos/Content/app/Models/Content.php
public function getEndpointsAttribute()
    {
        $id = $this->attributes['id'];
        $type = $this->attributes['type_id'];
        $endpoints['index'] = route('api.content', ['type' => $type]);
        $endpoints['destroy'] = route('api.content.destroy', ['type' => $type, 'content' => $id]);

        if (settings('is_multilanguage') && ContentType::find($type)->translatable)
            $endpoints['translate'] = route('api.content.translate', ['type' => $type, 'content' => $id]);

        return $endpoints;
    }
public function getEndpointsAttribute()
    {
        $id = $this->attributes['id'];
        $type = $this->attributes['type_id'];
        $endpoints['index'] = route('api.content', ['type' => $type]);
        $endpoints['destroy'] = route('api.content.destroy', ['type' => $type, 'content' => $id]);

        if (settings('is_multilanguage') && ContentType::find($type)->translatable)
            $endpoints['translate'] = route('api.content.translate', ['type' => $type, 'content' => $id]);

        return $endpoints;
    }
public function getEndpointsAttribute ( ) { $ id = $ this -> attributes [ 'id' ] ; $ type = $ this -> attributes [ 'type_id' ] ; $ endpoints [ 'index' ] = route ( 'api.content' , [ 'type' => $ type ] ) ; $ endpoints [ 'destroy' ] = route ( 'api.content.destroy' , [ 'type' => $ type , 'content' => $ id ] ) ; if ( settings ( 'is_multilanguage' ) && ContentType :: find ( $ type ) -> translatable ) $ endpoints [ 'translate' ] = route ( 'api.content.translate' , [ 'type' => $ type , 'content' => $ id ] ) ; return $ endpoints ; }
Add endpoints to model.
Add endpoints to model .