public function findByLocale($id, $locale)
    {
        return $this->model->with(['type', 'contents' => function($query) {
                        $query->with('lang');
                    }])->where('id', $id)->first();
    }
public function findByLocale($id, $locale)
    {
        return $this->model->with(['type', 'contents' => function($query) {
                        $query->with('lang');
                    }])->where('id', $id)->first();
    }
public function findByLocale ( $ id , $ locale ) { return $ this -> model -> with ( [ 'type' , 'contents' => function ( $ query ) { $ query -> with ( 'lang' ) ; } ] ) -> where ( 'id' , $ id ) -> first ( ) ; }
find model by locale

@param mixed $id
@param String $locale
@return Model
find model by locale