original_string: public function fetchOne(int $id): Builder
      {
          return $this->makeModel()->newQuery()->withoutGlobalScopes()->distinct()
                          ->select(['tbl_notifications_stack.*'])->with('content')->with('content.lang')->with('notification.type')
                          ->where(function ($query) {
                              $query->whereNull('author_id')->orWhere('author_id', user()->id)->orWhereHas('author', function($subquery) {
                                  $subquery->whereHas('roles', function($rolesQuery) {
                                      $rolesQuery->whereIn('tbl_roles.id', user()->roles->first()->getChilds());
                                  });
                              });
                          })
                          ->with('author')->with('author.roles')->with('content')
                          ->whereId($id);
      }
code: public function fetchOne(int $id): Builder
      {
          return $this->makeModel()->newQuery()->withoutGlobalScopes()->distinct()
                          ->select(['tbl_notifications_stack.*'])->with('content')->with('content.lang')->with('notification.type')
                          ->where(function ($query) {
                              $query->whereNull('author_id')->orWhere('author_id', user()->id)->orWhereHas('author', function($subquery) {
                                  $subquery->whereHas('roles', function($rolesQuery) {
                                      $rolesQuery->whereIn('tbl_roles.id', user()->roles->first()->getChilds());
                                  });
                              });
                          })
                          ->with('author')->with('author.roles')->with('content')
                          ->whereId($id);
      }
code_tokens: public function fetchOne ( int $ id ) : Builder { return $ this -> makeModel ( ) -> newQuery ( ) -> withoutGlobalScopes ( ) -> distinct ( ) -> select ( [ 'tbl_notifications_stack.*' ] ) -> with ( 'content' ) -> with ( 'content.lang' ) -> with ( 'notification.type' ) -> where ( function ( $ query ) { $ query -> whereNull ( 'author_id' ) -> orWhere ( 'author_id' , user ( ) -> id ) -> orWhereHas ( 'author' , function ( $ subquery ) { $ subquery -> whereHas ( 'roles' , function ( $ rolesQuery ) { $ rolesQuery -> whereIn ( 'tbl_roles.id' , user ( ) -> roles -> first ( ) -> getChilds ( ) ) ; } ) ; } ) ; } ) -> with ( 'author' ) -> with ( 'author.roles' ) -> with ( 'content' ) -> whereId ( $ id ) ; }
docstring: Fetch one stack item
  
  @param int $id
  @return Builder
docstring_tokens: Fetch one stack item